chore(deps): update dependency pyasn1 to v0.6.3 [security]#16117
chore(deps): update dependency pyasn1 to v0.6.3 [security]#16117renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request performs a critical dependency update for Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the pyasn1 dependency from version 0.6.1 to 0.6.3 in packages/sqlalchemy-spanner/requirements.txt. This is a security update to address CVE-2026-30922, a Denial of Service vulnerability. The version update and corresponding hash changes are correct and effectively mitigate the security risk. No issues were found with this change.
This PR contains the following updates:
==0.6.1→==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
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.