Update dependency pyasn1 to v0.6.3 [SECURITY] - autoclosed#113
Closed
renovate[bot] wants to merge 1 commit intomasterfrom
Closed
Update dependency pyasn1 to v0.6.3 [SECURITY] - autoclosed#113renovate[bot] wants to merge 1 commit intomasterfrom
renovate[bot] wants to merge 1 commit intomasterfrom
Conversation
1e21a70 to
158767b
Compare
158767b to
b895c36
Compare
|
❌ The last analysis has failed. |
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.0→==0.6.3Denial of Service in pyasn1 via Unbounded Recursion
CVE-2026-30922 / GHSA-jr27-m4p2-rc6r
More information
Details
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.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.
Severity
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
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
v0.6.2Compare Source
in OID/RELATIVE-OID decoder (thanks to tsigouris007)
pr #97
issue #91
pr #92
pr #90
v0.6.1Compare Source
pr #73
pr #62
pr #61
pr #60
pr #71
pr #70
tagMapandtypeMapaliasespr #72
pr #64
pr #63
pr #69
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.