chore(deps): update dependency pyasn1 to v0.6.3 [security]#124
Open
renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
Open
chore(deps): update dependency pyasn1 to v0.6.3 [security]#124renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
Conversation
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.4.8→==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
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
v0.6.0Compare Source
RELATIVE-OIDconstructpr #48
Now it provides a link to links to a formatted PDF version of the paper,
at a stable domain (researchgate), using https
pr #50
pr #56
v0.5.1Compare Source
Added support for PyPy 3.10 and Python 3.12
pr #32
Updated RTD configuration to include a dummy index.rst
redirecting to contents.html, ensuring compatibility with
third-party documentation and search indexes.
pr #47
Fixed the API breakage wih decoder.decode(substrateFun=...).
A substrateFun passed to
decoder.decode()can now be eitherv0.4 Non-Streaming or v0.5 Streaming. pyasn1 will detect and
handle both cases transparently.
A substrateFun passed to one of the new streaming decoders is
still expected to be v0.5 Streaming only.
pr #30
pr #39
v0.5.0Compare Source
Change
RealEncoder.supportIndefLenModetype to a booleanpr #21
Fix CI for py39 test environment
pr #25
Replace all snmplabs.com links
issue #4
Use correct SPDX identifier for the license
pr #16
Re-add
tagMapandtypeMapmodule level attributes to allencoder and decoder modules. They are aliases for
TAG_MAPandTYPE_MAP, issue #9.Restore API for passing for
tagMapandtypeMapargumentsto
EncoderandDecoderclasses by name and position,issue #12.
Re-add
tagMapandtypeMapmodule level attributes to allencoder and decoder modules. They are aliases for
TAG_MAPandTYPE_MAP, issue #9.Restore API for passing for
tagMapandtypeMapargumentsto
EncoderandDecoderclasses by name and position,Make BER/CER/DER decoders streaming and suspendible
The goal of this change is to make the decoder yielding on input
data starvation and resuming from where it stopped whenever the
caller decides to try again (hopefully making sure that some more
input becomes available).
This change makes it possible for the decoder to operate on streams
of data (meaning that the entire DER blob might not be immediately
available on input).
On top of that, the decoder yields partially reconstructed ASN.1
object on input starvation making it possible for the caller to
inspect what has been decoded so far and possibly consume partial
ASN.1 data.
All these new feature are natively available through
StreamingDecoderclass. Previously published API is implementedas a thin wrapper on top of that ensuring backward compatibility.
Added support for Python 3.8, 3.9, 3.10, 3.11
Removed support for EOL Pythons 2.4, 2.5, 2.6, 3.2, 3.3, 3.4, 3.5
Added support for PyPy 3.7, 3.8, 3.9
Modernized packaging and testing. pyasn1 now uses
setup.cfg,pyproject.toml, build, andGitHub Actions.
PyPI package ownership for
pyasn1andpyasn1-modulehas beentransfered to Christian Heimes and Simon Pichugin in
PyPI support ticket #2090.
The upstream repositories for
pyasn1andpyasn1-modulesare nowin the GitHub organization https://github.com/pyasn1/.
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 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.