Skip to content

fix(agentex): bump cryptography 46.0.6 -> 50.0.0 (CVE-2026-69247) - #432

Open
scale-prodsec[bot] wants to merge 1 commit into
mainfrom
security-bot/gfdvr-63609-trivy-remediate-cryptography4606-vulnerabilities
Open

scale-prodsec[bot] wants to merge 1 commit into
mainfrom
security-bot/gfdvr-63609-trivy-remediate-cryptography4606-vulnerabilities

Conversation

@scale-prodsec

@scale-prodsec scale-prodsec Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • cryptography 46.0.6 -> 50.0.0 in uv.lock, with the direct floor raised in agentex/pyproject.toml so a re-resolve cannot regress below the patched minimum.
  • Surface: the agentex workspace lock consumed by agentex/Dockerfile (uv sync --frozen --no-dev --package agentex-backend) — the build input for the scanned golden/agentex image.
  • 50.0.0 is the lowest release clearing all five advisories (the highest individual fix floor is 50.0.0, from CVE-2026-69247). Lock diff is one package: no additions, removals, or other version moves.

Coverage

Tickets: GFDVR-63609 (children GFDVR-63611, GFDVR-63612, GFDVR-63613, GFDVR-63614, GFDVR-63615)

CVEs: CVE-2026-69247 (HIGH, fix 50.0.0), CVE-2026-69249 (HIGH, 49.0.0), GHSA-537c-gmf6-5ccf (HIGH, 48.0.1), CVE-2026-69248 (MEDIUM, 49.0.0), CVE-2026-39892 (MEDIUM, 46.0.7)

Known tradeoff: Intel Mac local dev

Upstream removed x86_64 macOS wheels in 49.0.0, so cryptography becomes the first arm64-only macOS package in this lock (on main today, 45 packages ship macOS wheels and zero are arm64-only). On an Intel Mac, native uv sync would build from sdist and need Rust/Cargo.

There is no version that is both advisory-clean and Intel-wheeled — 48.0.1 keeps the universal2 wheel but does not fix CVE-2026-69247 (HIGH); 49.0.0+ drops the wheel. Impact is local dev only: the shipped image is linux/amd64 (cp311-abi3-manylinux_2_34_x86_64), CI is ubuntu-latest, and the Docker Compose dev path is unaffected on Intel. Whether to document a Rust toolchain requirement or declare Intel Macs unsupported is left as a maintainer policy decision rather than bundled into a CVE bump.

Validation

  • uv lock --upgrade-package 'cryptography==50.0.0' (uv 0.8.17, chosen so the committed revision = 3 is preserved — local uv 0.7.22 rewrites it to 2); uv lock --check clean.
  • Diff gate: only cryptography changes across 201 locked packages (no adds/removes), no lockfile-format/mode change, no registry URL flips, git diff --check clean.
  • Frozen install mirroring the Dockerfile (uv sync --frozen --no-dev --package agentex-backend) succeeds; resolved wheel is cp311-abi3-manylinux_2_34_x86_64 built against OpenSSL 4.0.1, which is what clears GHSA-537c-gmf6-5ccf.
  • Consumer contract (src/utils/credential_encryption.py, the only first-party import — Fernet/InvalidToken): round-trip, tampered-ciphertext and wrong-key both still raise InvalidToken, malformed key raises ValueError. Reviewed every changelog entry 46.0.7→50.0.0: no Fernet or InvalidToken change.
  • Credentials at rest are unaffected: a token encrypted under 46.0.6 decrypts under 50.0.0, and a token written by 50.0.0 still decrypts under 46.0.6 (rollback-safe).
  • Second dependent pyjwt[crypto] 2.13.0 (via mcp) verified RS256 + ES256 sign/verify — 49.0.0 removed PUBLIC_KEY_TYPES/PRIVATE_KEY_TYPES and 47.0.0 removed SECT curves; neither is used.
  • pytest tests/unit: 784 passed, identical to the untouched-main baseline (the 195 errors are pre-existing docker-socket fixture failures in that sandbox, present before the bump). tests/unit/utils/test_credential_encryption.py: 13 passed. src.api.app imports cleanly. CI: all 46 checks green, including the full integration matrix.
  • Upstream tracker swept for 47–50 regressions: only open items are #15543 (MinGW/MSYS2 linking) and #15500 (feature request) — neither affects linux x86_64 or macOS arm64.

Clears 5 advisories on the agentex golden image:
- CVE-2026-69247 (HIGH)  PKCS#7 EnvelopedData Bleichenbacher oracle (fix 50.0.0)
- CVE-2026-69249 (HIGH)  exponential path building via duplicate intermediates (fix 49.0.0)
- GHSA-537c-gmf6-5ccf (HIGH) vulnerable OpenSSL bundled in wheels (fix 48.0.1)
- CVE-2026-69248 (MEDIUM) wildcard DNS escape from permittedSubtrees (fix 49.0.0)
- CVE-2026-39892 (MEDIUM) non-contiguous buffer overflow (fix 46.0.7)

50.0.0 is the lowest release clearing all five. Direct floor raised in
agentex/pyproject.toml so a re-resolve cannot regress below the patched minimum.
@scale-prodsec
scale-prodsec Bot requested a review from a team as a code owner September 14, 2026 20:02
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​cryptography@​46.0.6 ⏵ 50.0.0100100 +31100100100

View full report

Comment thread uv.lock
{ url = "https://files.pythonhosted.org/packages/44/46/466269e833f1c4718d6cd496ffe20c56c9c8d013486ff66b4f69c302a68d/cryptography-46.0.6-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6617f67b1606dfd9fe4dbfa354a9508d4a6d37afe30306fe6c101b7ce3274b72", size = 4659255, upload-time = "2026-03-25T23:34:33.679Z" },
sdist = { url = "https://files.pythonhosted.org/packages/de/41/6cbdcf9142d00fe82836fbb51e503e58088575cf7a0fe1dbff6695bf0840/cryptography-50.0.0.tar.gz", hash = "sha256:eeac2acb5a20ed25e0ad6d1df9891a520b78b404266b6d11778f25d5d691a6c9", size = 880201, upload-time = "2026-07-31T14:25:10.11Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/c5/5c/59086b4aac5e879d38ddbcf74e4be7ade89cebc3eb199a55da998c3bb46a/cryptography-50.0.0-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:031e2d5dd4bb9caa3ca9c82e5a197fd8ae680232cee62603d1a813f3f07e3d03", size = 4001252, upload-time = "2026-07-31T14:23:33.331Z" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 cryptography 50.0.0 only provides macOS arm64 wheels in this lock. Intel Macs must build the source package, but the documented setup installs neither Rust nor Cargo. Add the required build tools or provide a supported Intel Mac install path.

Prompt To Fix With AI
This is a comment left during a code review.
Path: uv.lock
Line: 577

Comment:
`cryptography` 50.0.0 only provides macOS arm64 wheels in this lock. Intel Macs must build the source package, but the documented setup installs neither Rust nor Cargo. Add the required build tools or provide a supported Intel Mac install path.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Cursor Fix in Claude Code Fix in Codex

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified — this is accurate, and it is the one real tradeoff in this PR. Details, since it constrains what can be done here:

Confirmed. On main today, 45 locked packages ship macOS wheels and zero are arm64-only; 46.0.6 shipped macosx_10_9_universal2. After this bump cryptography becomes the first arm64-only macOS package in the lock, so on an Intel Mac uv sync would fall back to an sdist build needing Rust/Cargo.

It cannot be avoided at any fixed version. Upstream removed x86_64 macOS wheels in 49.0.0 ("Support for x86_64 macOS has been removed. We now only publish arm64 wheels for macOS"). Checked each candidate on PyPI:

version Intel-capable macOS wheel clears CVE-2026-69247 (HIGH)
48.0.1 yes (universal2) no
49.0.0 no no
50.0.0 / 50.0.1 no yes

CVE-2026-69247 (PKCS#7 Bleichenbacher oracle) is only fixed in 50.0.0, so there is no version that is both advisory-clean and Intel-Mac-wheeled. Staying at 48.0.1 to keep the wheel would leave a HIGH unpatched.

Scope of impact is local dev only, not the artifact. The shipped golden/agentex image is linux/amd64 and resolves cp311-abi3-manylinux_2_34_x86_64; CI is ubuntu-latest throughout. The Docker Compose dev path also works on Intel Macs unchanged, since it runs linux containers — that is the existing supported Intel install path. Only the native uv sync workflow on Intel hardware is affected.

I deliberately did not add a Rust/Cargo install step to dev.sh or the README here: whether to document a toolchain requirement vs. declare Intel Macs unsupported is a repo-policy call that shouldn't ride along in a CVE bump, and it is not required by any CI job. Flagging it for a maintainer to decide as follow-up. Happy to add the docs note in this PR if you'd prefer it bundled.

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.

1 participant