chore(deps): [dataflow-gcs-to-alloydb] Update vulnerabilityAlerts to v3.14.3 [SECURITY] - #595
Open
renovate-bot wants to merge 1 commit into
Conversation
renovate-bot
force-pushed
the
renovate/dataflow-gcs-to-alloydb-vulnerabilityalerts
branch
from
July 7, 2026 14:40
068a207 to
8f4eb22
Compare
renovate-bot
force-pushed
the
renovate/dataflow-gcs-to-alloydb-vulnerabilityalerts
branch
5 times, most recently
from
July 13, 2026 13:07
1401c53 to
a87ef12
Compare
renovate-bot
force-pushed
the
renovate/dataflow-gcs-to-alloydb-vulnerabilityalerts
branch
from
July 13, 2026 15:18
a87ef12 to
48f2d3d
Compare
|
copybara-service Bot
pushed a commit
that referenced
this pull request
Jul 21, 2026
…v0.32.0 [SECURITY] Import of github PR #595 from renovate-bot #595 > ℹ️ **Note** > > This PR body was truncated due to platform limits. This PR contains the following updates: [httplib2](https://redirect.github.com/httplib2/httplib2): `0.31.2` → `0.32.0` [pillow](https://redirect.github.com/python-pillow/Pillow): `12.2.0` → `12.3.0` --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/73) for more information. --- ### [CVE-2026-59939](https://nvd.nist.gov/vuln/detail/CVE-2026-59939) / [GHSA-j5g9-f88f-gfj3](https://redirect.github.com/advisories/GHSA-j5g9-f88f-gfj3) / PYSEC-2026-3444 --- ### Pillow `BdfFontFile`: `Image.new()` called without `_decompression_bomb_check()` — bomb protection bypass via font loading BIT-pillow-2026-55379 / [CVE-2026-55379](https://nvd.nist.gov/vuln/detail/CVE-2026-55379) / [GHSA-45hq-cxwh-f6vc](https://redirect.github.com/advisories/GHSA-45hq-cxwh-f6vc) / PYSEC-2026-2255 --- ### Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path BIT-pillow-2026-55798 / [CVE-2026-55798](https://nvd.nist.gov/vuln/detail/CVE-2026-55798) / [GHSA-4x4j-2g7c-83w6](https://redirect.github.com/advisories/GHSA-4x4j-2g7c-83w6) / PYSEC-2026-2257 --- ### Pillow: `FontFile.compile()`: `Image.new()` called without `_decompression_bomb_check()` BIT-pillow-2026-54060 / [CVE-2026-54060](https://nvd.nist.gov/vuln/detail/CVE-2026-54060) / [GHSA-5x94-69rx-g8h2](https://redirect.github.com/advisories/GHSA-5x94-69rx-g8h2) / PYSEC-2026-2254 --- ### Pillow: Out-of-bounds read via attacker-controlled row stride on Pillow's mmap path (McIdas AREA files) BIT-pillow-2026-54058 / [CVE-2026-54058](https://nvd.nist.gov/vuln/detail/CVE-2026-54058) / [GHSA-62p4-gmf7-7g93](https://redirect.github.com/advisories/GHSA-62p4-gmf7-7g93) --- ### Pillow: Heap out-of-bounds write `Image.paste()` / `Image.crop()` via signed coordinate overflow BIT-pillow-2026-59199 / [CVE-2026-59199](https://nvd.nist.gov/vuln/detail/CVE-2026-59199) / [GHSA-6r8x-57c9-28j4](https://redirect.github.com/advisories/GHSA-6r8x-57c9-28j4) / PYSEC-2026-3451 --- ### Pillow `PcfFontFile._load_bitmaps()`: `Image.frombytes()` called without `_decompression_bomb_check()` — bomb protection bypass via PCF font loading BIT-pillow-2026-54059 / [CVE-2026-54059](https://nvd.nist.gov/vuln/detail/CVE-2026-54059) / [GHSA-8v84-f9pq-wr9x](https://redirect.github.com/advisories/GHSA-8v84-f9pq-wr9x) / PYSEC-2026-2253 --- ### Pillow: Controlled heap out-of-bounds write in Pillow `ImageCmsTransform.apply()` via output mode mismatch BIT-pillow-2026-59205 / [CVE-2026-59205](https://nvd.nist.gov/vuln/detail/CVE-2026-59205) / [GHSA-9hw9-ch79-4vh6](https://redirect.github.com/advisories/GHSA-9hw9-ch79-4vh6) / PYSEC-2026-3453 --- ### Pillow TGA RLE encoder can serialize up to ~57 KB of adjacent heap data into generated images BIT-pillow-2026-59198 / [CVE-2026-59198](https://nvd.nist.gov/vuln/detail/CVE-2026-59198) / [GHSA-fj7v-r99m-22gq](https://redirect.github.com/advisories/GHSA-fj7v-r99m-22gq) <details> <summary>More information</summary> #### Details ##### Summary Pillow's TGA RLE encoder reads past its row buffer when saving a mode `"1"` image. Adjacent process heap bytes can be copied into the generated TGA file. The bug is reachable through the public save API: ```python im.save(out, format="TGA", compression="tga_rle") ``` Older affected Pillow versions use the equivalent public option `rle=True`. For mode `"1"`, Pillow allocates a packed row buffer of `ceil(width / 8)` bytes, but `ImagingTgaRleEncode()` treats the row as one full byte per pixel. The maximum valid TGA width is `65535`. At that width: ```text allocated packed row buffer: 8192 bytes encoder byte-offset walk: 65535 bytes maximum OOB window per row: 57343 bytes ``` On non-ASAN Pillow `12.2.0`, the public-only maximum-width PoC below serialized `57297` bytes from distinct out-of-bounds source offsets into one returned TGA, covering `99.92%` of the maximum adjacent heap window. No heap grooming, ctypes, private API, or malformed input file was used. The disclosure is emitted across many TGA packet payload copies of at most `128` bytes each, not one large `memcpy()`. ##### Details `src/PIL/TgaImagePlugin.py` allows mode `"1"` TGA output and selects the `tga_rle` encoder when RLE compression is requested. `src/encode.c:_setimage()` allocates the row buffer using the packed-bit formula: ```c state->bytes = (state->bits * state->xsize + 7) / 8; state->buffer = (UINT8 *)calloc(1, state->bytes); ``` For mode `"1"`, `state->bits == 1`. `src/libImaging/TgaRleEncode.c` then computes: ```c bytesPerPixel = (state->bits + 7) / 8; ``` This becomes `1`, and the encoder uses pixel indexes as byte offsets: ```c static int comparePixels(const UINT8 *buf, int x, int bytesPerPixel) { buf += x * bytesPerPixel; return memcmp(buf, buf + bytesPerPixel, bytesPerPixel) == 0; } ``` The packet payload `memcpy()` later copies those out-of-bounds source bytes into the output. Raw packets copy up to `128` contiguous bytes, while RLE packets copy one representative byte: ```c memcpy( dst, state->buffer + (state->x * bytesPerPixel - state->count), flushCount ); ``` A width-2 mode `"1"` image allocates one row byte and already triggers an ASAN heap-buffer-overflow read. Wider images increase the adjacent heap window and the amount of heap data that can be serialized. ##### PoC ##### Minimal ASAN trigger ```python import io from PIL import Image out = io.BytesIO() Image.new("1", (2, 1)).save(out, format="TGA", compression="tga_rle") ``` Observed on local Pillow `12.3.0.dev0` ASAN target: ```text ERROR: AddressSanitizer: heap-buffer-overflow READ of size 1 comparePixels /out/src/src/libImaging/TgaRleEncode.c:10 ImagingTgaRleEncode /out/src/src/libImaging/TgaRleEncode.c:81 0 bytes after a 1-byte allocation from _setimage ``` ##### Maximum-width heap disclosure This PoC uses one maximum-width row. It parses the generated TGA packets and extracts only payload bytes whose source offsets were outside the allocated packed row. Rows are avoided because they mostly repeat the same adjacent heap window. Run the following with a standard affected Pillow installation. ```python import hashlib import io import PIL from PIL import Image WIDTH = 65535 ATTEMPTS = 20 ROW_BYTES = (WIDTH + 7) // 8 MAX_OOB_WINDOW = WIDTH - ROW_BYT > ✂ **Note** > > PR body was truncated to here. --- ### Commit Message(s): -- Change 1 of 1 by Mend Renovate <bot@renovateapp.com>: chore(deps): [dataflow-gcs-to-alloydb] Update dependency pillow to v12.3.0 [SECURITY] GitOrigin-RevId: 90d79fd93cfd019bb1e7ee7dd23110c14611e476 Change-Id: I6005716367fb382a32d9d8c46aad8eff86cdfada
|
Apache beam has released v2.76.0-RC2 last week, however it hasn't added to Apache beam pypi repo yet (Link). Will update this PR when stable version of Apache beam 2.76.0 is available from pypi. cc: @ferrarimarco |
Member
|
Got it, thanks for the update. |
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:
3.14.1→3.14.34.3.0→4.4.10.31.2→0.32.00.6.3→0.6.40.5.5→0.6.0AIOHTTP: HTTP request smuggling via WebSocket upgrade
CVE-2026-69243 / GHSA-mfx4-hv73-q22v / PYSEC-2026-3546
More information
Details
Summary
The HTTP parsers were vulnerable to a request smuggling attack relating to WebSocket upgrades.
Impact
If using the server-side component, it may be possible for an attacker to execute a request smuggling vulnerability using an edge case in the WebSocket upgrade procedure. AIOHTT is unaware of any public exploit code.
Patch: aio-libs/aiohttp@6ae358f
Severity
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
AIOHTTP: WebSocket client accepts compressed frames without negotiated permessage-deflate
CVE-2026-59881 / GHSA-mq44-7p77-q5h7 / PYSEC-2026-3547
More information
Details
Summary
The client accepts and decompresses frames with the RSV1 bit set even when the
permessage-deflateextension was not negotiated.Impact
A client may unexpectedly decompress WebSocket frames when explicitly opted out. This could lead to additional CPU/memory consumption, but is unlikely to be a significant issue unless a zip bomb vulnerability or similar is also present.
Patch: aio-libs/aiohttp@47fb6ae
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
AIOHTTP: HTTP request smuggling via WebSocket upgrade
CVE-2026-69243 / GHSA-mfx4-hv73-q22v / PYSEC-2026-3546
More information
Details
Summary
The HTTP parsers were vulnerable to a request smuggling attack relating to WebSocket upgrades.
Impact
If using the server-side component, it may be possible for an attacker to execute a request smuggling vulnerability using an edge case in the WebSocket upgrade procedure. AIOHTT is unaware of any public exploit code.
Patch: aio-libs/aiohttp@6ae358f
Severity
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
AIOHTTP: WebSocket client accepts compressed frames without negotiated permessage-deflate
CVE-2026-59881 / GHSA-mq44-7p77-q5h7 / PYSEC-2026-3547
More information
Details
Summary
The client accepts and decompresses frames with the RSV1 bit set even when the
permessage-deflateextension was not negotiated.Impact
A client may unexpectedly decompress WebSocket frames when explicitly opted out. This could lead to additional CPU/memory consumption, but is unlikely to be a significant issue unless a zip bomb vulnerability or similar is also present.
Patch: aio-libs/aiohttp@47fb6ae
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
AIOHTTP: Out-of-bounds heap read in C HTTP response parser error path (malformed chunked response)
CVE-2026-69244 / GHSA-cq5v-8q36-5273 / PYSEC-2026-3545
More information
Details
Summary
An out-of-bounds heap read could occur in the C response parser while building an error message for a malformed response.
Impact
An attacker controlled server, or possibly an accidental response could trigger a DoS in the client.
Workaround
If unable to upgrade, the Python parser is unaffected and can be used with
AIOHTTP_NO_EXTENSIONS=1.Patch: aio-libs/aiohttp@49f65d5
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
AIOHTTP: Out-of-bounds heap read in C HTTP response parser error path (malformed chunked response)
CVE-2026-69244 / GHSA-cq5v-8q36-5273 / PYSEC-2026-3545
More information
Details
Summary
An out-of-bounds heap read could occur in the C response parser while building an error message for a malformed response.
Impact
An attacker controlled server, or possibly an accidental response could trigger a DoS in the client.
Workaround
If unable to upgrade, the Python parser is unaffected and can be used with
AIOHTTP_NO_EXTENSIONS=1.Patch: aio-libs/aiohttp@49f65d5
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
h2: Duplicate Host header could facilitate request smuggling
CVE-2026-71554 / GHSA-6hr6-w5qg-qmwg / PYSEC-2026-3628
More information
Details
Impact
h2 <=4.4.0 accepts request header blocks containing more than one Host header, and forwards every Host header to the consuming application. Where the consumer downgrades HTTP/2 to HTTP/1.1, the resulting request carries two Host header lines, which is a request smuggling primitive (CWE-444).
Patches
Patched and fixed in v4.4.1
Workarounds
Users of the h2 library are advised to check and follow HTTP semantics best practices in their application code. h2 provides best effort sanity checks, but ultimately the calling code is responsible to ensure proper and safe usage of HTTP/2 as provided by h2, hyperframe, and hpack.
References
Similar to the previously disclosed and fixed duplicate content-length issue.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
h2: Duplicate Host header could facilitate request smuggling
CVE-2026-71554 / GHSA-6hr6-w5qg-qmwg / PYSEC-2026-3628
More information
Details
Impact
h2 <=4.4.0 accepts request header blocks containing more than one Host header, and forwards every Host header to the consuming application. Where the consumer downgrades HTTP/2 to HTTP/1.1, the resulting request carries two Host header lines, which is a request smuggling primitive (CWE-444).
Patches
Patched and fixed in v4.4.1
Workarounds
Users of the h2 library are advised to check and follow HTTP semantics best practices in their application code. h2 provides best effort sanity checks, but ultimately the calling code is responsible to ensure proper and safe usage of HTTP/2 as provided by h2, hyperframe, and hpack.
References
Similar to the previously disclosed and fixed duplicate content-length issue.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
httplib2: Decompression Bomb Denial of Service via Unbounded gzip/deflate Response Handling
CVE-2026-59939 / GHSA-j5g9-f88f-gfj3 / PYSEC-2026-3444
More information
Details
Summary
The
httplib2HTTP client library performs unbounded decompression of HTTP response bodies encoded withContent-Encoding: gzipordeflate. A malicious or compromised HTTP server can return a small compressed payload (approximately 150 KB) that expands to an arbitrarily large size in memory (150 MB or more), causingMemoryErroror OOM-kill in the client process. This is a classic decompression bomb (zip bomb) attack against the HTTP client.Any application using
httplib2.Http().request()against untrusted or attacker-controlled HTTP endpoints is affected.Details
Affected code:
httplib2/__init__.py-_decompressContent()functionThe decompression path has two unbounded operations:
gzip decompression (line 394):
The
.read()call with no size argument decompresses the entire gzip payload into a single in-memory bytes object. There is no limit on the decompressed size.deflate decompression (line 397):
Similarly,
zlib.decompress()returns the fully decompressed content as a single bytes object with no size bound.Automatic invocation (line 1431):
_decompressContent()is called automatically on every HTTP response that includes aContent-Encoding: gzipordeflateheader. The full compressed body is already buffered in memory viaresponse.read()before decompression begins.Root cause: There is no
max_decompressed_size, streaming decompression with size tracking, or decompression ratio check anywhere in the decompression path. The library unconditionally trusts the server's compressed payload size.Attack vector: Any HTTP server (including man-in-the-middle attackers or compromised upstream services) can trigger this by returning a response with:
Content-Encoding: gzipheaderProof of Concept
Step 1 - Start a malicious HTTP server that serves a gzip decompression bomb:
Step 2 - Run the httplib2 client (in a separate terminal):
Expected output (client):
Reproduction metrics:
MemoryErrortriggered duringgzip.GzipFile.read()Impact
Severity: High
Any application using
httplib2to make HTTP requests to untrusted servers is vulnerable. The attack requires no authentication, no special configuration, and no user interaction - the server simply returns a crafted gzip-compressed response.Real-world scenarios:
Impact scaling: The attacker can create arbitrarily large decompression bombs. A 1 MB compressed payload can decompress to several gigabytes, guaranteeing OOM-kill on virtually any system. The attack is fully deterministic and requires only a single HTTP response.
Downstream exposure:
httplib2is a widely used Python HTTP client library with millions of downloads. It is a dependency of Google's API client libraries (google-api-python-client,google-auth-httplib2), meaning applications using Google Cloud APIs may be indirectly affected if they process responses from untrusted intermediaries.Credit
Found by a security research team from the University of Sydney, focusing on detecting open source software vulnerabilities.
Liyi Zhou: https://lzhou1110.github.io/
Ziyue Wang: https://zyy0530.github.io/
Strick: https://str1ckl4nd.github.io/
Maurice: https://maurice.busystar.org/
Chenchen Yu: https://7thparkk.github.io/
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
CVE-2026-59939 / GHSA-j5g9-f88f-gfj3 / PYSEC-2026-3444
More information
Details
httplib2 is a comprehensive HTTP client library for Python. Prior to 0.32.0, httplib2 performs unbounded decompression of HTTP response bodies encoded with Content-Encoding: gzip or deflate in _decompressContent in httplib2/init.py, allowing a malicious or compromised HTTP server to return a small compressed payload that expands to an arbitrarily large size in memory and causes MemoryError or OOM-kill in the client process. This issue is fixed in version 0.32.0.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
pyasn1: Quadratic complexity in OBJECT IDENTIFIER and RELATIVE-OID processing allows denial of service
CVE-2026-59885 / GHSA-8ppf-4f7h-5ppj / PYSEC-2026-3456
More information
Details
Impact
The BER/CER/DER decoders process OBJECT IDENTIFIER and RELATIVE-OID values in quadratic time relative to the number of arcs. A small crafted payload (tens of kilobytes) containing an OID with many arcs consumes seconds of CPU per decode() call, allowing denial of service in any application that decodes untrusted ASN.1 data (certificates, LDAP, SNMP, Kerberos, etc.). The corresponding encoders have the same quadratic behavior, reachable when an application re-encodes previously decoded attacker-supplied values.
The arc-size limit introduced for CVE-2026-23490 bounds the byte length of an individual arc but not the number of arcs, so it does not mitigate this issue.
Affected components
ObjectIdentifierPayloadDecoder and RelativeOIDPayloadDecoder in pyasn1/codec/ber/decoder.py; ObjectIdentifierEncoder and RelativeOIDEncoder in pyasn1/codec/ber/encoder.py. The CER and DER codecs inherit these and are equally affected.
Patches
Fixed in pyasn1 0.6.4: arc accumulation in both decoders and encoders now runs in linear time.
Workarounds
Limit the size of untrusted ASN.1 input before decoding.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
pyasn1: Uncontrolled resource consumption when converting decoded REAL values
CVE-2026-59886 / GHSA-hm4w-wwcw-mr6r / PYSEC-2026-3457
More information
Details
Impact
The univ.Real type converted its (mantissa, base, exponent) value to a Python float using exact big-integer exponentiation. A BER/CER/DER-encoded REAL value only a few bytes long can carry a very large exponent, causing this computation to attempt to materialize an astronomically large integer.
Any operation that triggers float conversion on such a decoded value — prettyPrint(), str(), comparison, arithmetic, or an explicit float() call — consumes excessive CPU and memory, hanging the process. Applications that decode untrusted ASN.1 data and then print, log, or compare the decoded objects are vulnerable to denial of service. Decoding alone does not trigger the issue.
Affected components
The encoders and the native codec are not affected. Applications that never handle ASN.1 REAL values are not affected.
Patches
Fixed in pyasn1 0.6.4. Binary (base-2) values are now converted with math.ldexp(), and decimal (base-10) values with exponents beyond float range raise OverflowError without constructing huge intermediate integers. Existing behavior is preserved: out-of-range values raise OverflowError and prettyPrint() renders them as .
Workarounds
Avoid converting, printing, or comparing decoded Real objects from untrusted sources; inspect the raw (mantissa, base, exponent) tuple instead.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
pyasn1 BER/CER/DER decoder denial of service via unbounded long-form tag IDs
CVE-2026-59884 / GHSA-m4p7-r5rc-7g4j / PYSEC-2026-3455
More information
Details
Impact
The BER decoder (shared by the CER and DER codecs) parses long-form tags by accumulating continuation octets in a loop with no upper bound on the size of the tag ID. A crafted input can force the decoder to build an arbitrarily large integer, with CPU cost growing quadratically in input size — a ~1 MB input consumes over a minute of CPU. On Python 3.11+, the oversized tag ID can also trigger an unhandled
ValueError(integer string conversion limit) while the decoder formats error messages, violating the documentedPyAsn1Errorcontract and potentially bypassing caller error handling.Any application decoding untrusted BER/CER/DER input is affected.
Affected components
pyasn1.codec.ber.decoder—decode()andStreamingDecoderpyasn1.codec.cer.decoderandpyasn1.codec.der.decoder, which inheritthe same tag parsing
pyasn1.type.tag—Tag/TagSetreprs could raiseValueErrorwhenrendering oversized tag IDs (reachable through decoder error paths)
The encoders and the
pyasn1.codec.nativecodec are not affected.Patches
Fixed in 0.6.4. Long-form tag IDs are now limited to 20 octets (140-bit tag IDs, matching the existing OID arc limit); oversized tags are rejected with
PyAsn1Error. Tag ID rendering in reprs and error messages was additionally hardened against the interpreter's integer-to-string conversion limit.Workarounds
Bound the size of untrusted input passed to
decode()before calling it.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
CVE-2026-59884 / GHSA-m4p7-r5rc-7g4j / PYSEC-2026-3455
More information
Details
pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.4, the BER decoder shared by the CER and DER codecs parses long-form tags by accumulating continuation octets without an upper bound on the tag ID size, allowing a crafted input to force construction of an arbitrarily large integer with CPU cost growing quadratically and to trigger unhandled ValueError exceptions in Python 3.11+ error formatting paths. Any application decoding untrusted BER, CER, or DER input is affected. This issue is fixed in version 0.6.4.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
CVE-2026-59885 / GHSA-8ppf-4f7h-5ppj / PYSEC-2026-3456
More information
Details
pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.4, the BER, CER, and DER decoders process OBJECT IDENTIFIER and RELATIVE-OID values in quadratic time relative to the number of arcs, so a small crafted payload containing an OID with many arcs consumes excessive CPU per decode() call and can deny service to applications that decode untrusted ASN.1 data. The corresponding encoders have the same quadratic behavior when an application re-encodes previously decoded attacker-supplied values. This issue is fixed in version 0.6.4.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
CVE-2026-59886 / GHSA-hm4w-wwcw-mr6r / PYSEC-2026-3457
More information
Details
pyasn1 is a generic ASN.1 library for Python. Prior to 0.6.4, the univ.Real type converted its mantissa, base, and exponent value to a Python float using exact big-integer exponentiation. A BER, CER, or DER encoded REAL value only a few bytes long can carry a very large exponent, causing float conversion through prettyPrint(), str(), comparison, arithmetic, int(), or an explicit float() call to consume excessive CPU and memory and hang applications that decode untrusted ASN.1 data and then print, log, or compare decoded objects. This issue is fixed in version 0.6.4.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
sqlparse: Generated Python and PHP snippets allow SQL string breakout through unescaped backslashes
CVE-2026-59894 / GHSA-3496-9g83-7v6x / PYSEC-2026-3696
More information
Details
Summary
The documented Python and PHP output modes generate source-code snippets from caller-supplied SQL. Their output filters escape quote characters without first escaping existing backslashes. Crafted SQL can therefore neutralize the generated quote escape, terminate the intended language string, and place attacker-controlled code into the generated snippet. If a downstream consumer executes or imports that generated source, the injected code runs in the consumer's environment.
Details
The Python output filter places SQL in a single-quoted string and replaces each single quote with an escaped quote. The PHP output filter performs the equivalent operation for a double-quoted string. Neither transformation escapes pre-existing backslashes before escaping quotes. A backslash supplied immediately before a quote causes the generated backslash to be escaped instead of the quote, allowing the quote to close the string.
The affected modes are exposed through
sqlparse.format(..., output_format='python'),sqlparse.format(..., output_format='php'), and the correspondingsqlformat -loptions. Formatting produces the injected source but does not itself execute it; code execution occurs when a downstream workflow treats the generated snippet as Python or PHP code.Relevant code locations:
sqlparse/formatter.py:193— selection of the output-language filterssqlparse/filters/output.py:45— opening of the generated Python stringsqlparse/filters/output.py:65— incomplete Python quote escapingsqlparse/filters/output.py:91— opening of the generated PHP stringsqlparse/filters/output.py:114— incomplete PHP quote escapingPoC
A complete validated reproduction is attached as output_format_snippet_injection-poc.zip. The archive contains
reproduction/at its root, uses Git and Docker, and validates the Python output path by generating and executing a snippet containing a controlled marker-file write.Extract the archive beside this report, then run:
./reproduction/run.shObserved result:
The generated Python snippet placed the attacker-controlled
pathlib.Path(...).write_text(...)expression outside the intended SQL string. Executing the snippet wrote the expected proof marker, emittedEVOHUNT_OUTPUT_FORMAT_INJECTION_VERIFIED, and completed successfully.Verification method:
The verification helper calls
sqlparse.format(..., output_format='python'), executes the generated snippet, and fails unless the injected Python expression writes the exact proof marker file.Limitations:
No reproduction blocker was recorded. The attached harness directly verifies the Python output path; exploitation also requires a downstream consumer to execute or import the generated source.
Impact
This is source-code injection in the opt-in Python and PHP snippet-generation modes. An attacker who controls SQL converted by one of these modes can inject language code into the generated artifact. If that artifact is subsequently executed, the attacker can run code with the permissions and access of the downstream Python or PHP process.
The demonstrated end-to-end result is code execution through a generated Python snippet. Formatting the SQL alone does not execute the payload, and ordinary parsing, splitting, or formatting without these output modes is not shown to be affected.
Severity
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:LReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
sqlparse: Quadratic O(n²) DoS in group_comments
CVE-2026-71491 / GHSA-f2ff-p2ww-7p4p / PYSEC-2026-3697
More information
Details
Summary
A comment-only statement (
-- c\n*n) may cause a Denial of Service (DoS).Details
Location: sqlparse/engine/grouping.py:331-341 (
group_comments), invoked first ingroup()atgrouping.py:439. Reachable viasqlparse.parse()andsqlparse.format(sql, strip_comments=True).A statement made of many single-line comments (
'-- c\n'repeated) lexes in O(n) butgroup_commentsis O(n²):The
whileloop runs n times and eachtoken_next_by/token_not_matchingrescans the O(n) remaining tokens. When all tokens are comments/newlines nothing ever groups, yet the full scan is repeated per token.Two following factors increase the severity:
group_commentsruns first ingroup()(grouping.py:439), before the_group_matchingtoken-count guard (grouping.py:34-39). So the entire quadratic cost is paid even on oversized input.MAX_GROUPING_TOKENSdoes not provide protection on this vector.format(sql, strip_comments=True), used by query loggers, SQL firewalls, ORMs, and migration tools.PoC
Tested using Python 3.14:
Output:
Time increase of ~4× per 2× input (quadratic).
parse()shows the identical curve. Instrumented scan counts are exactly 1.0M / 4.0M / 16.0M tokens for n=1000/2000/4000. A ~250 KB comment-only payload forces minutes of CPU regardless of the 10000 token cap.Impact
Denial of Service
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
sqlparse: Inefficient Regex Handling of Dollar-Quoted SQL Literals Leads to ReDoS (Denial of Service)
CVE-2026-59893 / GHSA-prg7-hcfm-mfcr / PYSEC-2026-3698
More information
Details
Summary
sqlparse contains a Regular Expression Denial of Service (ReDoS) vulnerability in its dollar-quoted SQL literal lexer. The regex pattern at
sqlparse/keywords.py:33uses a backreference (\1) to match closing dollar-quote delimiters, causing O(n²) CPU complexity when processing inputs containing many unique, unmatched dollar-quote opening sequences. An attacker who can supply arbitrary SQL text to any application using sqlparse can trigger sustained CPU exhaustion, resulting in a denial of service. No authentication or special privileges are required.Scope note: the same regex shape — a lazy dot-all quantifier terminated by a delimiter, applied at every input position by the lexer loop — is also present in the two multiline-comment patterns. Those are covered by this advisory and by the same fix; see "Additional affected pattern: multiline comments" below.
Details
The vulnerable regex is defined in
sqlparse/keywords.pyas part ofSQL_REGEX:This pattern first captures a dollar-quote delimiter (e.g.,
$tag$) into group 1, then attempts to match any characters ([\s\S]*?) up to the same delimiter again via backreference\1. When no matching closing delimiter exists, the regex engine exhausts the remaining input before concluding there is no match. For a sequence of N unique unmatched openers, each opener triggers a full scan of the remaining string, yielding O(N²) total regex work.The lexer applies this regex at every character position (
sqlparse/lexer.py:136-138):The data flow from public API to the vulnerable sink is:
sqlparse/__init__.py:20—parse(sql)accepts caller-controlled SQL.sqlparse/__init__.py:29— delegates toparsestream(sql, encoding).sqlparse/__init__.py:43—FilterStack.run(stream, encoding)is invoked.sqlparse/engine/filter_stack.py:31—lexer.tokenize(sql, encoding)is called with no length limit or timeout.sqlparse/lexer.py:137— every regex in_SQL_REGEXis tried at the current position.sqlparse/keywords.py:33— the backreference regex performs repeated delimiter searches.The
MAX_GROUPING_TOKENS = 10000limit insqlparse/engine/grouping.py:20fires only after lexing completes and does not bound regex CPU time. There is no input length check, delimiter count check, or regex timeout before the sink.Empirically measured scaling confirms super-linear complexity:
The timing ratio from n=1000 to n=2000 is 3.31× (input doubled → time tripled), confirming O(n²) growth.
PoC
Prerequisites: Python 3.x with sqlparse installed (tested against version
0.5.6.dev0, commitc923da9).Using Docker (isolated reproduction):
Direct Python reproduction:
Expected output (super-linear scaling confirms ReDoS):
Attack input structure:
Each token
$ai$xresembles a PostgreSQL-style dollar-quote opening tag. Because every tag is unique and no closing tag is present, the regex engine must scan to the end of the string for each opener before backtracking.Remediation (proposed patch):
Replace the backreference regex with a deterministic two-pass approach: first locate all delimiter positions with
re.finditer, then resolve open/close pairs in O(n) time, eliminating catastrophic backtracking entirely. Seereport_excerpt.mdfor the full diff.Additional affected pattern: multiline comments
Reported independently as GHSA-3crh-2448-7855 (by @7thParkk) and merged into this advisory: it is the same defect class in the same lexer loop, and it is addressed by the same fix.
Two further entries in
SQL_REGEXuse the same lazy dot-all shape, terminated by a literal delimiter instead of a backreference:A backreference is not required to trigger the quadratic behaviour. The cost comes from the lexer retrying every pattern at every input position (
sqlparse/lexer.py:136-138): an unterminated/*scans to the end of the input and fails, so N unclosed openers cost O(N²).PoC
Lexing-only timings on
0.5.6.dev0(commitf80af6a), isolating the regex work from grouping:Roughly 3.7x per doubling of the input, i.e. quadratic.
Note for reproduction:
"/*" * non its own is linear and does not reproduce the issue — in/*/*/*...the openers form overlapping*/pairs, so the pattern matches immediately. The opener must be padded (e.g."/*x ") so that it never closes. A reproduction that only tries the unpadded form will wrongly conclude the issue is not present.Impact
This is a Regular Expression Denial of Service (ReDoS) vulnerability. Any application or service that passes user-controlled SQL text to
sqlparse.parse(),sqlparse.format(), orsqlparse.split()is affected. No authentication, special configuration, or elevated privileges are required — a single crafted HTTP request (or any other input channel carrying SQL text) is sufficient.Under sustained attack, one or more CPU cores can be kept at 100% utilization, degrading or completely blocking service for all other users. Because the grouping-stage token limit fires only after the regex work is done, it provides no protection against this attack.
Affected use cases include: web applications that accept and display or format SQL; database administration tools; ORM query inspectors; SQL linters and formatters exposed as APIs.
Reproduction artifacts
Dockerfilepoc.py""" PoC: ReDoS in sqlparse dollar-quoted literal regex (VULN-001) Affected code: sqlparse/keywords.py:33 (r'((?<![\\w\\"\\$])\\$(?:[_A-ZÀ-Ü]\\w*)?\\$)[\\s\\S]*?\\1', tokens.Literal) The backreference \\1 forces > ✂ **Note** > > PR body was truncated to here.