Skip to content

[Snyk] Security upgrade pyjwt from 1.7.1 to 2.14.0 - #550

Open
Robthreefold wants to merge 2 commits into
mainfrom
snyk-fix-62332238a73de53d23e039709fc7257f
Open

Robthreefold wants to merge 2 commits into
mainfrom
snyk-fix-62332238a73de53d23e039709fc7257f

Conversation

@Robthreefold

Copy link
Copy Markdown
Owner

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):

  • requirements2.txt
⚠️ Warning
PyGithub 1.51 requires pyjwt, which is not installed.

Breaking Change Risk

Merge Risk: High

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-21431293
@Robthreefold

Copy link
Copy Markdown
Owner Author

Merge Risk: High

The upgrade from PyJWT v1.7.1 to v2.14.0 is a major version change that introduces significant and mandatory breaking changes, primarily in the jwt.decode() function. Code modifications are required for the application to function correctly.

Key Breaking Changes:

  • jwt.decode() requires the algorithms parameter: This is the most critical change. Previously optional, the algorithms parameter is now mandatory to prevent security vulnerabilities. Calls to decode() without this parameter will fail.

  • Updated Options for jwt.decode(): Several deprecated parameters have been removed and moved into an options dictionary.

    • Verifying claims like expiration (exp) must now be done using options={"require": ["exp"]} instead of require_exp=True.
    • Disabling signature verification, previously verify=False, is now done with options={"verify_signature": False}.
  • Python Version Support: Support for Python 2.7 and versions below 3.6 was dropped in v2.0.0. Support for Python 3.7 was dropped in v2.9.0.

  • Dependency Changes: Support for PyCrypto and ecdsa libraries has been removed. The library now exclusively relies on the cryptography package.

  • HMAC Key Validation: As of v2.13.0, empty strings ("" or b"") are no longer accepted as valid HMAC keys and will raise an InvalidKeyError. This prevents a common misconfiguration where a missing environment variable could lead to an insecure key.

Recommendation:

Developers must review every call to jwt.decode() and update it to explicitly pass the expected signing algorithms via the algorithms parameter. All other decoding options must be migrated to the new options dictionary syntax. Ensure your environment is running a supported Python version (3.8+ recommended for the latest versions in this range).

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

@Robthreefold

Robthreefold commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Robthreefold

Robthreefold commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Robthreefold

Robthreefold commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Robthreefold

Robthreefold commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Robthreefold

Robthreefold commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Robthreefold

Robthreefold commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Robthreefold

Robthreefold commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Robthreefold

Robthreefold commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-PYJWT-21431293

This branch was previously deployed

1 inactive deployment
outsystems — 59485a52 Deployed Oct 23, 2026 by Robthreefold via security #195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants