{"id":"CVE-2025-61920","aliases":["DEBIAN-CVE-2025-61920","DLA-4352-1","EUVD-2025-33768","GHSA-pq5p-34cr-23v9","PYSEC-2026-1203","ROOT-APP-PYPI-CVE-2025-61920","SUSE-SU-2025:3754-1","UBUNTU-CVE-2025-61920","USN-8065-1","openSUSE-SU-2025:15629-1"],"status":"published","title":"Authlib is vulnerable to Denial of Service via Oversized JOSE Segments","description":"Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00638,"percentile":0.50934,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20","CWE-400","CWE-770"],"published":"2025-10-10T19:25:07Z","modified":"2026-10-28T02:30:55Z","fixes":[{"ecosystem":"PyPI","package":"authlib","fixed_in":["1.6.5"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"python-authlib","fixed_in":["1.2.0-1+deb12u1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"python-authlib","fixed_in":["1.6.0-1+deb13u1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"python-authlib","fixed_in":["1.6.5-1"],"sources":["osv"]},{"ecosystem":"Root:PyPI","package":"rootio-Authlib","fixed_in":["1.6.4+root.io.1","1.3.1+root.io.1","1.6.3+root.io.1","1.6.2+root.io.1","1.6.0+root.io.1","0.15.5+root.io.1","1.3.2+root.io.1","1.6.1+root.io.1","1.3.1+root.io.2","1.6.3+root.io.2","0.15.5+root.io.3","1.6.0+root.io.2","1.6.3+root.io.3","0.15.5+root.io.4","0.15.5+root.io.5","1.6.1+root.io.2","1.6.0+root.io.3","1.6.3+root.io.4","1.6.1+root.io.3","0.15.5+root.io.6","1.6.0+root.io.4","1.6.3+root.io.5","1.6.1+root.io.4","0.15.5+root.io.7","0.15.5+root.io.8","1.6.1+root.io.5","0.15.5+root.io.9","1.6.3+root.io.6","1.3.1+root.io.3","1.6.2+root.io.2","1.6.4+root.io.2","1.6.0+root.io.5","1.6.1+root.io.6","1.3.2+root.io.2"],"sources":["osv"]},{"ecosystem":"Root:PyPI","package":"Authlib","fixed_in":["0.15.5+aikido.9","1.6.3+aikido.6","1.3.1+aikido.3","1.6.2+aikido.2","1.6.4+aikido.2","1.6.0+aikido.5","1.6.1+aikido.6","1.3.2+aikido.2"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Module for Python 3 15 SP6","package":"python-Authlib","fixed_in":["1.3.1-150600.3.6.1"],"sources":["osv"]},{"ecosystem":"SUSE:Linux Enterprise Module for Python 3 15 SP7","package":"python-Authlib","fixed_in":["1.3.1-150600.3.6.1"],"sources":["osv"]},{"ecosystem":"openSUSE:Leap 15.6","package":"python-Authlib","fixed_in":["1.3.1-150600.3.6.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"python-authlib","fixed_in":["0.15.5-1ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:24.04:LTS","package":"python-authlib","fixed_in":["1.3.0-1ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"python-Authlib","fixed_in":["1.6.5-1.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.5"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.0-1+deb12u1"}]}],"versions":["1.2.0-1"]},{"source":"osv","ecosystem":"Debian:13","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.0-1+deb13u1"}]}],"versions":["1.6.0-1"]},{"source":"osv","ecosystem":"Debian:14","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.5-1"}]}],"versions":["1.6.0-1","1.6.1-1","1.6.3-1","1.6.4-1"]},{"source":"osv","ecosystem":"Debian:11","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.15.4-1+deb11u1"}]}],"versions":["0.15.4-1"],"bundled":4},{"source":"osv","ecosystem":"PyPI","package":"authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.5"}]}],"versions":["0.1","0.10","0.11","0.12","0.12.1","0.13","0.14","0.14.1","0.14.2","0.14.3","0.15","0.15.1","0.15.2","0.15.3","0.15.4","0.15.5","0.15.6","0.1rc0","0.2","0.2.1","0.3","0.4","0.4.1","0.5","0.5.1","0.6","0.7","0.8","0.9","1.0.0","1.0.0a1","1.0.0a2","1.0.0b1","1.0.0b2","1.0.0rc1","1.0.1","1.1.0","1.2.0","1.2.1","1.3.0","1.3.1","1.3.2","1.4.0","1.4.1","1.5.0","1.5.1","1.5.2","1.6.0","1.6.1","1.6.2","1.6.3","1.6.4"]},{"source":"osv","ecosystem":"PyPI","package":"authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.5"}]}],"versions":["0.1","0.10","0.11","0.12","0.12.1","0.13","0.14","0.14.1","0.14.2","0.14.3","0.15","0.15.1","0.15.2","0.15.3","0.15.4","0.15.5","0.15.6","0.1rc0","0.2","0.2.1","0.3","0.4","0.4.1","0.5","0.5.1","0.6","0.7","0.8","0.9","1.0.0","1.0.0a1","1.0.0a2","1.0.0b1","1.0.0b2","1.0.0rc1","1.0.1","1.1.0","1.2.0","1.2.1","1.3.0","1.3.1","1.3.2","1.4.0","1.4.1","1.5.0","1.5.1","1.5.2","1.6.0","1.6.1","1.6.2","1.6.3","1.6.4"]},{"source":"osv","ecosystem":"Root:PyPI","package":"rootio-Authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.4+root.io.1"},{"fixed":"1.3.1+root.io.1"},{"fixed":"1.6.3+root.io.1"},{"fixed":"1.6.2+root.io.1"},{"fixed":"1.6.0+root.io.1"},{"fixed":"0.15.5+root.io.1"},{"fixed":"1.3.2+root.io.1"},{"fixed":"1.6.1+root.io.1"},{"fixed":"1.3.1+root.io.2"},{"fixed":"1.6.3+root.io.2"},{"fixed":"0.15.5+root.io.3"},{"fixed":"1.6.0+root.io.2"},{"fixed":"1.6.3+root.io.3"},{"fixed":"0.15.5+root.io.4"},{"fixed":"0.15.5+root.io.5"},{"fixed":"1.6.1+root.io.2"},{"fixed":"1.6.0+root.io.3"},{"fixed":"1.6.3+root.io.4"},{"fixed":"1.6.1+root.io.3"},{"fixed":"0.15.5+root.io.6"},{"fixed":"1.6.0+root.io.4"},{"fixed":"1.6.3+root.io.5"},{"fixed":"1.6.1+root.io.4"},{"fixed":"0.15.5+root.io.7"},{"fixed":"0.15.5+root.io.8"},{"fixed":"1.6.1+root.io.5"},{"fixed":"0.15.5+root.io.9"},{"fixed":"1.6.3+root.io.6"},{"fixed":"1.3.1+root.io.3"},{"fixed":"1.6.2+root.io.2"},{"fixed":"1.6.4+root.io.2"},{"fixed":"1.6.0+root.io.5"},{"fixed":"1.6.1+root.io.6"},{"fixed":"1.3.2+root.io.2"}]}]},{"source":"osv","ecosystem":"Root:PyPI","package":"Authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.15.5+aikido.9"},{"fixed":"1.6.3+aikido.6"},{"fixed":"1.3.1+aikido.3"},{"fixed":"1.6.2+aikido.2"},{"fixed":"1.6.4+aikido.2"},{"fixed":"1.6.0+aikido.5"},{"fixed":"1.6.1+aikido.6"},{"fixed":"1.3.2+aikido.2"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Python 3 15 SP6","package":"python-Authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.1-150600.3.6.1"}]}]},{"source":"osv","ecosystem":"SUSE:Linux Enterprise Module for Python 3 15 SP7","package":"python-Authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.1-150600.3.6.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Leap 15.6","package":"python-Authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.1-150600.3.6.1"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.15.5-1ubuntu0.1~esm1"}]}],"versions":["0.15.4-1","0.15.5-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.0-1ubuntu0.1~esm1"}]}],"versions":["1.2.1-1","1.3.0-1"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.5.1-1","1.5.2-1","1.6.0-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:26.04:LTS","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.6.0-1","1.6.5-1","1.6.6-1","1.6.7-1","1.6.7-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.15.5-1ubuntu0.1~esm1"}]}],"versions":["0.15.4-1","0.15.5-1"],"bundled":5},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"python-authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.3.0-1ubuntu0.1~esm1"}]}],"versions":["1.2.1-1","1.3.0-1"],"bundled":5},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-Authlib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.5-1.1"}]}]}],"products":[{"vendor":"authlib","product":"authlib"}],"references":[{"url":"https://github.com/authlib/authlib/security/advisories/GHSA-pq5p-34cr-23v9","tags":["x_refsource_CONFIRM","Exploit","Mitigation","Vendor Advisory","advisory","web","report"]},{"url":"https://github.com/authlib/authlib/commit/867e3f87b072347a1ae9cf6983cc8bbf88447e5e","tags":["x_refsource_MISC","Patch","fix","web","report"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00032.html","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61920","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-pq5p-34cr-23v9","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/61xxx/CVE-2025-61920.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-61920","tags":["advisory"]},{"url":"https://github.com/authlib/authlib","tags":["package"]},{"url":"https://pypi.org/project/authlib","tags":["package"]},{"url":"https://www.suse.com/support/update/announcement/2025/suse-su-20253754-1/","tags":["advisory"]},{"url":"https://bugzilla.suse.com/1251921","tags":["report"]},{"url":"https://www.suse.com/security/cve/CVE-2025-61920","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2025-61920","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-61920","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-8065-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-37568","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2025-59420","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2025-62706","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2025-68158","tags":["report"]},{"url":"","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2025-61920","title":"Authlib is vulnerable to Denial of Service via Oversized JOSE Segments","description":"Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.","status":"published","published":"2025-10-10T19:25:07.679Z","modified":"2025-11-03T17:45:23.708Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-20","CWE-400","CWE-770"],"updated_at":"2026-11-02T14:32:45.105469Z"}],"euvd":[{"id":"EUVD-2025-33768","description":"Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.","status":"published","published":"2025-10-10T19:25:07Z","modified":"2025-11-03T17:45:23Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T19:49:35.000596Z"}],"ghsa":[{"id":"GHSA-pq5p-34cr-23v9","title":"Authlib is vulnerable to Denial of Service via Oversized JOSE Segments","description":"**Summary**\nAuthlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service.\n\n**Impact**\n\n- Attack vector: unauthenticated network attacker submits a malicious JWS/JWT.\n\n- Effect: base64 decode + JSON/crypto processing of huge buffers pegs CPU and allocates large amounts of RAM; a single request can exhaust service capacity.\n\n- Observed behaviour: on a test host, the legacy code verified a 500 MB header, consuming ~4 GB RSS and ~9 s CPU before failing.\n\n- Severity: High. CVSS v3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (7.5).\n\nAffected Versions\nAuthlib ≤ 1.6.3 (and earlier) when verifying JWS/JWT tokens. Later snapshots with 256 KB header/signature limits are not affected.\n\n**Proof of concept**\n\nLocal demo (do not run against third-party systems):\nDownload [jws_segment_dos_demo.py](https://github.com/user-attachments/files/22450820/jws_segment_dos_demo.py) the PoC in direcotry authlib/\nRun following Command\n```\npython3 jws_segment_dos_demo.py --variant both --sizes \"500MB\" --fork-per-case\n\n```\nEnvironment: Python 3.13.6, Authlib 1.6.4, Linux x86_64, CPUs=8 \nSample output: Refined\n\u003cimg width=\"1295\" height=\"306\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6dd8410f-bc36-4717-8cee-649bac9bf291\" /\u003e\n\n\n\n\nThe compilation script prints separate “[ATTACKER]” (token construction) and “[SERVER]” (Authlib verification) RSS deltas so defenders can distinguish client-side preparation from server-side amplification. Regression tests authlib/tests/dos/test_jose_dos.py further capture the issue; the saved original_util.py/original_jws.py reproductions still accept the malicious payload.\n\n**Remediation**\n\n- Apply the upstream patch that introduces decoded size limits:\n\n- MAX_HEADER_SEGMENT_BYTES = 256 KB\n\n- MAX_SIGNATURE_SEGMENT_BYTES = 256 KB\n\n- Enforce Limits in authlib/jose/util.extract_segment and _extract_signature.\n\n- Deploy the patched release immediately.\n\n- For additional defence in depth, reject JWS/JWT inputs above a few kilobytes at the proxy or WAF layer, and rate-limit verification endpoints.\n\n**Workarounds (temporary)**\n\n- Enforce input size limits before handing tokens to Authlib.\n\n- Use application-level throttling to reduce amplification risk.\n\n**Resources**\n\n- Demo script: jws_segment_dos_demo.py\n\n- Tests: authlib/tests/dos/test_jose_dos.py\n\n- OWASP JWT Cheat Sheet (DoS guidance)","status":"published","published":"2025-10-10T20:26:43Z","modified":"2025-11-03T18:31:46Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-20","CWE-400","CWE-770"],"updated_at":"2026-11-02T14:39:04.350802Z"}],"nvd":[{"id":"CVE-2025-61920","description":"Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.","status":"published","published":"2025-10-10T20:15:37.893Z","modified":"2026-10-19T16:10:00.26Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-20","CWE-400","CWE-770"],"updated_at":"2026-11-02T14:11:36.851295Z"}],"osv":[{"id":"CVE-2025-61920","title":"Authlib is vulnerable to Denial of Service via Oversized JOSE Segments","description":"Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.","status":"published","published":"2025-10-10T19:25:07.679Z","modified":"2026-10-28T02:30:55.438044191Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-20","CWE-400","CWE-770"],"updated_at":"2026-11-02T15:44:51.516975Z"},{"id":"DEBIAN-CVE-2025-61920","description":"Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.","status":"published","published":"2025-10-10T20:15:37.893Z","modified":"2026-10-23T17:47:39.53805337Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:47.697959Z"},{"id":"GHSA-pq5p-34cr-23v9","title":"Authlib is vulnerable to Denial of Service via Oversized JOSE Segments","description":"**Summary**\nAuthlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service.\n\n**Impact**\n\n- Attack vector: unauthenticated network attacker submits a malicious JWS/JWT.\n\n- Effect: base64 decode + JSON/crypto processing of huge buffers pegs CPU and allocates large amounts of RAM; a single request can exhaust service capacity.\n\n- Observed behaviour: on a test host, the legacy code verified a 500 MB header, consuming ~4 GB RSS and ~9 s CPU before failing.\n\n- Severity: High. CVSS v3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (7.5).\n\nAffected Versions\nAuthlib ≤ 1.6.3 (and earlier) when verifying JWS/JWT tokens. Later snapshots with 256 KB header/signature limits are not affected.\n\n**Proof of concept**\n\nLocal demo (do not run against third-party systems):\nDownload [jws_segment_dos_demo.py](https://github.com/user-attachments/files/22450820/jws_segment_dos_demo.py) the PoC in direcotry authlib/\nRun following Command\n```\npython3 jws_segment_dos_demo.py --variant both --sizes \"500MB\" --fork-per-case\n\n```\nEnvironment: Python 3.13.6, Authlib 1.6.4, Linux x86_64, CPUs=8 \nSample output: Refined\n\u003cimg width=\"1295\" height=\"306\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6dd8410f-bc36-4717-8cee-649bac9bf291\" /\u003e\n\n\n\n\nThe compilation script prints separate “[ATTACKER]” (token construction) and “[SERVER]” (Authlib verification) RSS deltas so defenders can distinguish client-side preparation from server-side amplification. Regression tests authlib/tests/dos/test_jose_dos.py further capture the issue; the saved original_util.py/original_jws.py reproductions still accept the malicious payload.\n\n**Remediation**\n\n- Apply the upstream patch that introduces decoded size limits:\n\n- MAX_HEADER_SEGMENT_BYTES = 256 KB\n\n- MAX_SIGNATURE_SEGMENT_BYTES = 256 KB\n\n- Enforce Limits in authlib/jose/util.extract_segment and _extract_signature.\n\n- Deploy the patched release immediately.\n\n- For additional defence in depth, reject JWS/JWT inputs above a few kilobytes at the proxy or WAF layer, and rate-limit verification endpoints.\n\n**Workarounds (temporary)**\n\n- Enforce input size limits before handing tokens to Authlib.\n\n- Use application-level throttling to reduce amplification risk.\n\n**Resources**\n\n- Demo script: jws_segment_dos_demo.py\n\n- Tests: authlib/tests/dos/test_jose_dos.py\n\n- OWASP JWT Cheat Sheet (DoS guidance)","status":"published","published":"2025-10-10T20:26:43Z","modified":"2026-09-10T03:50:30.223430893Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-20","CWE-400","CWE-770"],"updated_at":"2026-11-02T15:46:53.700556Z"},{"id":"PYSEC-2026-1203","title":"Authlib is vulnerable to Denial of Service via Oversized JOSE Segments","description":"**Summary**\nAuthlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service.\n\n**Impact**\n\n- Attack vector: unauthenticated network attacker submits a malicious JWS/JWT.\n\n- Effect: base64 decode + JSON/crypto processing of huge buffers pegs CPU and allocates large amounts of RAM; a single request can exhaust service capacity.\n\n- Observed behaviour: on a test host, the legacy code verified a 500 MB header, consuming ~4 GB RSS and ~9 s CPU before failing.\n\n- Severity: High. CVSS v3.1: AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (7.5).\n\nAffected Versions\nAuthlib ≤ 1.6.3 (and earlier) when verifying JWS/JWT tokens. Later snapshots with 256 KB header/signature limits are not affected.\n\n**Proof of concept**\n\nLocal demo (do not run against third-party systems):\nDownload [jws_segment_dos_demo.py](https://github.com/user-attachments/files/22450820/jws_segment_dos_demo.py) the PoC in direcotry authlib/\nRun following Command\n```\npython3 jws_segment_dos_demo.py --variant both --sizes \"500MB\" --fork-per-case\n\n```\nEnvironment: Python 3.13.6, Authlib 1.6.4, Linux x86_64, CPUs=8 \nSample output: Refined\n\u003cimg width=\"1295\" height=\"306\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6dd8410f-bc36-4717-8cee-649bac9bf291\" /\u003e\n\n\n\n\nThe compilation script prints separate “[ATTACKER]” (token construction) and “[SERVER]” (Authlib verification) RSS deltas so defenders can distinguish client-side preparation from server-side amplification. Regression tests authlib/tests/dos/test_jose_dos.py further capture the issue; the saved original_util.py/original_jws.py reproductions still accept the malicious payload.\n\n**Remediation**\n\n- Apply the upstream patch that introduces decoded size limits:\n\n- MAX_HEADER_SEGMENT_BYTES = 256 KB\n\n- MAX_SIGNATURE_SEGMENT_BYTES = 256 KB\n\n- Enforce Limits in authlib/jose/util.extract_segment and _extract_signature.\n\n- Deploy the patched release immediately.\n\n- For additional defence in depth, reject JWS/JWT inputs above a few kilobytes at the proxy or WAF layer, and rate-limit verification endpoints.\n\n**Workarounds (temporary)**\n\n- Enforce input size limits before handing tokens to Authlib.\n\n- Use application-level throttling to reduce amplification risk.\n\n**Resources**\n\n- Demo script: jws_segment_dos_demo.py\n\n- Tests: authlib/tests/dos/test_jose_dos.py\n\n- OWASP JWT Cheat Sheet (DoS guidance)","status":"published","published":"2026-07-07T16:03:07.352723Z","modified":"2026-07-07T17:46:32.7267934Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:52:54.622769Z"},{"id":"ROOT-APP-PYPI-CVE-2025-61920","title":"CVE-2025-61920 in rootio-Authlib - Patched by Root","description":"Root has patched CVE-2025-61920 in the rootio-Authlib package for Root:PyPI. Multiple fixed versions available.","status":"published","published":"2026-06-03T14:52:12Z","modified":"2026-06-03T19:30:25.347206454Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:53:27.940619Z"},{"id":"UBUNTU-CVE-2025-61920","description":"Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.5, Authlib’s JOSE implementation accepts unbounded JWS/JWT header and signature segments. A remote attacker can craft a token whose base64url‑encoded header or signature spans hundreds of megabytes. During verification, Authlib decodes and parses the full input before it is rejected, driving CPU and memory consumption to hostile levels and enabling denial of service. Version 1.6.5 patches the issue. Some temporary workarounds are available. Enforce input size limits before handing tokens to Authlib and/or use application-level throttling to reduce amplification risk.","status":"published","published":"2025-10-10T20:15:00Z","modified":"2026-07-16T20:48:18.632607623Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T16:55:50.817402Z"},{"id":"DLA-4352-1","title":"python-authlib - security update","status":"published","published":"2025-10-29T00:00:00Z","modified":"2025-10-29T04:34:52.744951Z","updated_at":"2026-11-02T15:46:12.7027Z"},{"id":"openSUSE-SU-2025:15629-1","title":"python311-Authlib-1.6.5-1.1 on GA media","description":"These are all security issues fixed in the python311-Authlib-1.6.5-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2025-10-13T00:00:00Z","modified":"2026-03-23T04:54:01.598915Z","updated_at":"2026-11-02T16:58:37.810934Z"},{"id":"SUSE-SU-2025:3754-1","title":"Security update for python-Authlib","description":"This update for python-Authlib fixes the following issues:\n\n- CVE-2025-61920: limited the size of the header to prevent DoS (bsc#1251921).\n","status":"published","published":"2025-10-23T10:27:00Z","modified":"2026-02-04T04:25:24.623887Z","updated_at":"2026-11-02T15:54:00.344164Z"},{"id":"USN-8065-1","title":"python-authlib vulnerabilities","description":"Millie Solem discovered that Authlib did not properly restrict algorithm\nselection during JWT verification, allowing HMAC verification with\nasymmetric public keys when no algorithm was specified. A remote attacker\ncould possibly use this issue to bypass signature verification and forge\ntokens, resulting in authentication bypass or privilege escalation.\n(CVE-2024-37568)\n\nMuhammad Noman Ilyas discovered that Authlib did not properly enforce\ncritical header parameter handling during JSON Web Signature verification,\nleading to unknown critical parameters being incorrectly accepted. A remote\nattacker could possibly use this issue to bypass security policies in mixed\ndeployments, resulting in authentication bypass, replay attacks, or\nprivilege escalation. (CVE-2025-59420)\n\nMuhammad Noman Ilyas discovered that Authlib did not properly limit the\nsize of JSON Web Signature or JSON Web Token header and signature segments.\nA remote attacker could possibly use this issue to cause excessive memory\nor processor consumption, leading to a denial of service. (CVE-2025-61920)\n\nMuhammad Noman Ilyas discovered that Authlib performed unbounded\ndecompression when processing certain compressed encrypted tokens. A remote\nattacker could possibly use this issue to send a specially crafted token\nthat can be expanded to a large size during decompression, causing a denial\nof service. (CVE-2025-62706)\n\nIt was discovered that Authlib did not properly bind cached state\ninformation to the initiating user session during OAuth authentication\nflows. A remote attacker could possibly use this issue to perform cross-\nsite request forgery attacks, resulting in unauthorized actions or\nauthentication bypass. This issue only affected Ubuntu 24.04 LTS.\n(CVE-2025-68158)","status":"published","published":"2026-02-25T20:43:00Z","modified":"2026-04-27T18:41:08.675153Z","updated_at":"2026-11-02T16:58:22.951676Z"}]}}
