Skip to content

[Snyk] Security upgrade pyjwt from 2.9.0 to 2.12.0#28

Open
mandibles232 wants to merge 1 commit intomainfrom
snyk-fix-129d8c89eeae3d069bc577f5d1f9894b
Open

[Snyk] Security upgrade pyjwt from 2.9.0 to 2.12.0#28
mandibles232 wants to merge 1 commit intomainfrom
snyk-fix-129d8c89eeae3d069bc577f5d1f9894b

Conversation

@mandibles232
Copy link

snyk-top-banner

Snyk has created this PR to fix 1 vulnerabilities in the pip dependencies of this project.

Snyk changed the following file(s):

  • tools/python/requirements.txt

Breaking Change Risk

Merge Risk: Medium

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.
  • Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-PYJWT-15518059
@mandibles232
Copy link
Author

Merge Risk: Medium

This upgrade for pyjwt introduces stricter validation and drops support for older Python versions, which could impact existing applications.

Key Changes:

  • Stricter Validation: The library now enforces stricter validation for claims, keys, and headers. Specifically:
    • Version 2.12.0 fixes a vulnerability by correctly validating the crit (Critical) Header Parameter, rejecting tokens with unknown critical extensions as required by RFC 7515.
    • Version 2.11.0 added stricter validation for ECDSA curves, key types, and requires the iss claim to be a string.
    • Version 2.10.0 added validation for sub and jti claims.
  • Python Version Support: Support for Python 3.7 was dropped in version 2.9.0 and for Python 3.8 in version 2.10.0.
  • Behavioral Change: In version 2.10.0, the requirement for the algorithm parameter was removed from the top-level JWT API, with enforcement moved to the underlying JWS API.

Recommendation:
Verify that your environment is using Python 3.9 or newer. It is crucial to test that your existing tokens and keys comply with the new, stricter validation rules to avoid unexpected failures in production.

Source: PyJWT Changelog

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants