azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Bundled requirements pin cryptography==46.0.7 (GHSA-537c-gmf6-5ccf); fix needs a coordinated cryptography+pyOpenSSL bump

Open kobihikri opened this issue 4 months ago • 2 comments

Describe the bug

The bundled-build requirements pin cryptography==46.0.7 in all three platform files (src/azure-cli/requirements.py3.{Linux,Darwin,windows}.txt). That version is affected by GHSA-537c-gmf6-5ccf — "Vulnerable OpenSSL included in cryptography wheels" (CVSS 7.5, AV:N/AC:L/PR:N/UI:N/…/A:H). Per OSV the fix is cryptography 48.0.1.

The reason I'm filing an issue rather than a PR: it isn't a clean one-line bump. The same files pin pyOpenSSL==26.0.0, whose metadata requires cryptography<47,>=46.0.0 — so bumping cryptography to 48.0.1 alone would break resolution. Fixing it properly is a coordinated bump:

  • cryptography → ≥ 48.0.1 (fixed), and
  • pyOpenSSL → a version that permits it — e.g. the current pyOpenSSL 26.3.0 requires cryptography>=49.0.0,<50, which would pull cryptography 49.x (also ≥ the 48.0.1 fix).

Because these are your generated bundled-build pins (MSI/deb/rpm/Homebrew), the exact coordinated set is yours to regenerate and validate — I didn't want to hand you a requirements diff that might not resolve against the other ~140 pins.

Related

  • A separate open PR (#33563) bumps cryptography to 48.0.1 only under /tools/aaz-flow (dev tooling), not these shipped requirements files.

To Reproduce

grep -H cryptography== src/azure-cli/requirements.py3.*.txt   # cryptography==46.0.7
curl -s https://api.osv.dev/v1/vulns/GHSA-537c-gmf6-5ccf | jq .affected  # fixed: 48.0.1
curl -s https://pypi.org/pypi/pyOpenSSL/26.0.0/json | jq '.info.requires_dist[]' | grep crypto  # cryptography<47,>=46.0.0

Expected behavior

Bundled azure-cli ships cryptography ≥ 48.0.1 (with a compatible pyOpenSSL), clearing GHSA-537c-gmf6-5ccf.


I'm happy to prepare the coordinated requirements PR if you confirm the pyOpenSSL/cryptography pair you'd like. For transparency: I used AI assistance in preparing this; I verified the pins, the advisory, and the pyOpenSSL constraint myself.

kobihikri avatar Jul 15 '26 17:07 kobihikri

Thank you for opening this issue, we will look into it.

yonzhan avatar Jul 15 '26 17:07 yonzhan

Th following versions are updated and will be available in release 2.90.0 cryptography=48.0.1 pyOpenSSL=26.2.0

msarfraz avatar Aug 25 '26 00:08 msarfraz