Skip to content

Upgrade python-pyasn1 to 0.6.4 for CVE-2026-59884, CVE-2026-59885, CVE-2026-59886#18046

Draft
BinduSri-6522866 wants to merge 2 commits into
microsoft:fasttrack/3.0from
Kanishk-Bansal:topic_upgrade_python-pyasn1-3.0
Draft

Upgrade python-pyasn1 to 0.6.4 for CVE-2026-59884, CVE-2026-59885, CVE-2026-59886#18046
BinduSri-6522866 wants to merge 2 commits into
microsoft:fasttrack/3.0from
Kanishk-Bansal:topic_upgrade_python-pyasn1-3.0

Conversation

@BinduSri-6522866

@BinduSri-6522866 BinduSri-6522866 commented Jul 17, 2026

Copy link
Copy Markdown
Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Upgrade python-pyasn1 to 0.6.4 for CVE-2026-59884, CVE-2026-59885, CVE-2026-59886

  • Removed downstream CVE patch CVE-2026-30922.patch from spec, which is fixed in version - 0.6.3+
    CVE-2026-30922 - pyasn1 Vulnerable to Denial of Service via Unbounded Recursion
Change Log
  • deleted: ../SPECS/python-pyasn1/CVE-2026-30922.patch
  • modified: ../SPECS/python-pyasn1/python-pyasn1.signatures.json
  • modified: ../SPECS/python-pyasn1/python-pyasn1.spec
  • modified: ../cgmanifest.json
Does this affect the toolchain?

NO

Links to CVEs
Test Methodology

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging fasttrack/3.0 PRs Destined for Azure Linux 3.0 labels Jul 17, 2026
@Kanishk-Bansal Kanishk-Bansal added security CVE-fixed-by-upgrade CVE fixed by package upgrade labels Jul 17, 2026
@BinduSri-6522866

BinduSri-6522866 commented Jul 17, 2026

Copy link
Copy Markdown
Author

python-pyasn1 0.4.8 → 0.6.4 — Change Breakdown & Compatibility Analysis (Azure Linux)

1. Scope of the upgrade

image

Current spec state (python-pyasn1.spec) already reflects part of this transition: it uses %pyproject_wheel / %pyproject_install / %pytest instead of the legacy %py3_build/setup.py test, which is required for 0.6.2+.

2. Compatibility verdict

No intentional public API removals occur between 0.4.8 and 0.6.4 for well-formed ASN.1 data — the encode/decode/type-model API used by consumers (univ.*, decoder.decode(), encoder.encode(), namedtype, constraint, etc.) is stable across this span. All "breaking" behavior is defensive: it makes the decoder reject previously-accepted malformed/oversized/deeply-nested input (the entire point of the four CVE fixes). Practical implications:

Build system: already migrated in this spec (%pyproject_wheel/%pyproject_install/%pytest) — no further action needed.
Python floor: now Python ≥3.8 (Python 2 dropped) — irrelevant for Azure Linux (ships 3.9+).
Deprecated aliases: tagMap/typeMap still work but warn — only matters if a consumer imports those lowercase names directly.
Stricter limits: nesting depth, tag-ID length (140 bits), OID arc handling, and Real overflow now fail fast with PyAsn1Error/OverflowError instead of silently succeeding or hanging. Only affects abnormal/adversarial input, not normal protocol data.

3. Real compatibility risk: downstream consumers in this repo

pyasn1-modules.spec — pinned at 0.2.8 (released 2020-01-09)
python-cryptography.spec — Requires: python3-pyasn1
python-rsa.spec — Requires: python3-pyasn1
pyOpenSSL.spec — BuildRequires: python3-pyasn1
syslog-ng.spec — BuildRequires: python3-pyasn1, python3-pyasn1-modules
tpm2-pkcs11.spec — Requires: python3-pyasn1-modules (transitive dependency on pyasn1)
pyasn1-modules 0.2.8 is the highest-risk item. Verified via PyPI metadata: upstream pyasn1-modules has historically pinned pyasn1 tightly per major line —
image

pyasn1-modules 0.4.2 (current upstream) requires pyasn1<0.7.0,>=0.6.1
pyasn1-modules 0.3.0/0.4.0/0.4.1 targeted the 0.4.6–0.6.x range
pyasn1-modules 0.2.8 predates pyasn1 0.5.0 entirely and was written against pre-streaming-decoder, pre-TAG_MAP/TYPE_MAP internals.
Because pyasn1-modules.spec declares Requires: python3-pyasn1 with no upper version bound, RPM will happily let python3-pyasn1-modules (0.2.8) install alongside python3-pyasn1 0.6.4 with no dependency-resolution error — but the actual Python code may fail at import/runtime if it touches renamed/removed internals. This directly affects tpm2-pkcs11 and syslog-ng, both of which pull in python3-pyasn1-modules.

4. Bottom line

The pyasn1 0.4.8→0.6.4 upgrade is low-risk on its own (security hardening, no intentional API removal). The actual compatibility risk in this repo is the stale pyasn1-modules 0.2.8 package, which should be validated — and likely upgraded — alongside this change.

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

Labels

CVE-fixed-by-upgrade CVE fixed by package upgrade fasttrack/3.0 PRs Destined for Azure Linux 3.0 Packaging security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants