chore(deps): update dependency pyasn1 to v0.6.3 [security]#1386
Merged
hessjcg merged 1 commit intoGoogleCloudPlatform:mainfrom Mar 17, 2026
Merged
Conversation
Collaborator
|
/gcbrun |
hessjcg
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==0.6.2→==0.6.3GitHub Vulnerability Alerts
CVE-2026-30922
Summary
The
pyasn1library is vulnerable to a Denial of Service (DoS) attack caused by uncontrolled recursion when decoding ASN.1 data with deeply nested structures. An attacker can supply a crafted payload containing nestedSEQUENCE(0x30) orSET(0x31) tags with Indefinite Length (0x80) markers. This forces the decoder to recursively call itself until the Python interpreter crashes with aRecursionErroror consumes all available memory (OOM), crashing the host application.This is a distinct vulnerability from CVE-2026-23490 (which addressed integer overflows in OID decoding). The fix for CVE-2026-23490 (
MAX_OID_ARC_CONTINUATION_OCTETS) does not mitigate this recursion issue.Details
The vulnerability exists because the decoder iterates through the input stream and recursively calls
decodeFun(the decoding callback) for every nested component found, without tracking or limiting the recursion depth.Vulnerable Code Locations:
indefLenValueDecoder(Line 998):for component in decodeFun(substrate, asn1Spec, allowEoo=True, **options):This method handles indefinite-length constructed types. It sits inside a
while Trueloop and recursively calls the decoder for every nested tag.valueDecoder(Lines 786 and 907):for component in decodeFun(substrate, componentType, **options):This method handles standard decoding when a schema is present. It contains two distinct recursive calls that lack depth checks: Line 786: Recursively decodes components of
SEQUENCEorSETtypes. Line 907: Recursively decodes elements ofSEQUENCE OForSET OFtypes._decodeComponentsSchemaless(Line 661):for component in decodeFun(substrate, **options):This method handles decoding when no schema is provided.
In all three cases,
decodeFunis invoked without passing adepthparameter or checking against a globalMAX_ASN1_NESTINGlimit.PoC
Impact
pyasn1to parse untrusted ASN.1 data (e.g., LDAP, SNMP, Kerberos, X.509 parsers) can be crashed remotely.Credits
Vulnerability discovered by Kevin Tu of TMIR at ByteDance.
Release Notes
pyasn1/pyasn1 (pyasn1)
v0.6.3Compare Source
limit to ASN.1 decoder to prevent stack overflow from deeply
nested structures (thanks for reporting, romanticpragmatism)
issue #54
pr #100
issue #86
pr #101
issue #81
pr #102
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.