Skip to content

[PER-15532] fix: clear remaining pdp-v2 image CVEs from customer scan (PER-15358) - #328

Merged
dshoen619 merged 2 commits into
mainfrom
david/fix-remaining-image-cves-sqlparse-otel-vex
Jul 24, 2026
Merged

[PER-15532] fix: clear remaining pdp-v2 image CVEs from customer scan (PER-15358)#328
dshoen619 merged 2 commits into
mainfrom
david/fix-remaining-image-cves-sqlparse-otel-vex

Conversation

@dshoen619

Copy link
Copy Markdown
Contributor

Summary

A customer scanning permitio/pdp-v2:0.9.13 before promoting it into their Artifactory surfaced 57 findings / 43 unique CVEs (10 Critical, 29 High, 18 Medium; no CISA KEV entries).

The large majority were already fixed after 0.9.13 was cut (May 13) and just need a release: the Go dependency bumps in permit-opa #38, the cryptography>=48.0.1 pin, and the libssl3/libcrypto3/pyjwt/aiohttp updates a rebuild picks up automatically. This PR covers what was genuinely left over.

Fixed

  • GHSA-27jp-wm6q-gp25sqlparse 0.5.0 → 0.5.5 (fixed in 0.5.4).
    Note: sqlparse is never imported anywhere in the codebase; all three commits that ever touched it were vulnerability-sweep floor pins. Flagged inline as a removal candidate rather than removed here, to keep this release low-risk.

Waived (verified unreachable against the source)

Two new OpenVEX not_affected statements, joining the two existing starlette waivers. All four are fixed only in starlette >= 1.x, which OPAL's starlette<1 cap forbids.

  • CVE-2026-48710 — a malformed Host header can make request.url.path diverge from the path actually routed, bypassing security checks that read request.url. The PDP makes no security decision on request.url: authentication is enforced per-route via FastAPI Depends/HTTPBearer (horizon/authentication.py), there is no add_middleware or BaseHTTPMiddleware anywhere, and no raw ASGI scope[...] reads outside tests. The one path-keyed authorization check — the write-route test in cloud_proxy (horizon/proxy/api.py) — reads request.path_params, which Starlette's router populates from the raw scope path and which this CVE explicitly leaves unaffected.
  • CVE-2026-48817 — unsafe getattr dispatch in starlette.endpoints.HTTPEndpoint, where the lowercased HTTP method is resolved against the endpoint without restricting the lookup to known verbs. The PDP defines no HTTPEndpoint or WebSocketEndpoint subclass; every route is an APIRouter decorator with explicit methods, so the vulnerable dispatch class is never instantiated.

Dropped

  • CVE-2026-50163 (oras-go) — waiver removed. oras-go v2.6.2 fixes it and permit-opa now pins it, so the waiver is no longer needed.

Also refreshed the now-stale comments in requirements.txt and tests.yml that still described "two starlette CVEs" and the oras-go waiver.

Merge order

⚠️ permitio/permit-opa#42 must merge first. This PR removes the CVE-2026-50163 waiver, and the image build clones permit-opa@main — so if this merges first, the Docker Scout gate will fail on CVE-2026-50163 with no waiver left to suppress it.

Test plan

  • VEX doc is valid JSON; author remains Permit.io, matching vex-author in the Scout gate step (without which statements are displayed but not suppressed — see Docker Scout cves with vex-location docker/scout-cli#207)
  • Confirmed Alpine v3.22 main ships openssl 3.5.7-r0, so the 13 libcrypto3/libssl3 CVEs clear via the Dockerfile's existing apk upgrade on rebuild
  • Verified both new waiver claims by inspection: no HTTPEndpoint/WebSocketEndpoint subclasses, no StaticFiles mount, no request.form(), no add_middleware/BaseHTTPMiddleware, no raw scope[...] outside tests
  • CI: Docker Scout gate passes with the updated VEX (requires permit-opa#42 merged first)

What still won't be clean after this

Two groups remain in the customer's report and will need scanner exceptions on their side:

  • starlette (3 CVEs) — blocked by OPAL's starlette<1 cap; justifications above.
  • Python 3.10.20 interpreter (7 CVEs) — CPE matches whose fixes are on the 3.11/3.13 branches; needs a base-image migration to Python 3.13. Worth scheduling regardless, since 3.10 reaches EOL in October.

🤖 Generated with Claude Code

A customer scan of permitio/pdp-v2:0.9.13 surfaced 43 unique CVEs. Most
were already fixed after 0.9.13 was cut (Go deps via permit-opa #38,
cryptography pin, and the libssl3/pyjwt/aiohttp bumps a rebuild picks up
automatically). This covers what was genuinely left.

Fixed:
* GHSA-27jp-wm6q-gp25 - sqlparse 0.5.0 -> 0.5.5 (fixed in 0.5.4). Note
  sqlparse is never imported; it has only ever been carried as a floor
  pin from past vuln sweeps. Flagged inline as a removal candidate.

Waived (unreachable code paths, verified against the source):
* CVE-2026-48710 - malformed Host header desyncs request.url.path from
  the routed path. No PDP security decision reads request.url: auth is
  per-route via FastAPI Depends/HTTPBearer, there is no add_middleware or
  BaseHTTPMiddleware, and the one path-keyed check (cloud_proxy) reads
  request.path_params, which the router fills from the raw scope path.
* CVE-2026-48817 - unsafe getattr dispatch in starlette HTTPEndpoint.
  The PDP defines no HTTPEndpoint/WebSocketEndpoint subclass; every route
  is an APIRouter decorator with explicit methods.

Both are fixed only in starlette >=1.x, which OPAL's starlette<1 cap
forbids, so they join the two existing starlette waivers.

Dropped:
* CVE-2026-50163 (oras-go) - waiver removed; oras-go v2.6.2 fixes it and
  permit-opa now pins it. That bump MUST merge to permit-opa@main before
  this branch merges, since the PDP build clones permit-opa@main and the
  scout gate will otherwise fail with the waiver gone.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jul 21, 2026

Copy link
Copy Markdown

PER-15358

PER-15532

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces remaining CVE findings in the permitio/pdp-v2 container image by bumping a leftover vulnerable Python dependency and updating the project’s OpenVEX waiver document (plus related CI comments) to reflect current “not_affected” determinations for Starlette CVEs that cannot be patched due to OPAL’s starlette<1 constraint.

Changes:

  • Bump sqlparse from 0.5.0 to 0.5.5 to address GHSA-27jp-wm6q-gp25.
  • Update .docker/scout/pdp-v2.vex.json (timestamp/version) to drop the oras-go waiver and add two additional Starlette not_affected statements.
  • Refresh the Docker Scout gate workflow comments to match the updated waiver set.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
requirements.txt Bumps sqlparse and updates the Starlette CVE waiver explanation comment.
.github/workflows/tests.yml Updates Docker Scout gate comments to list the current waived Starlette CVEs.
.docker/scout/pdp-v2.vex.json Updates OpenVEX statements: removes oras-go waiver and adds/reshuffles Starlette not_affected entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dshoen619
dshoen619 requested a review from EliMoshkovich July 21, 2026 19:31
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

🔍 Vulnerabilities of permitio/pdp-v2:next

📦 Image Reference permitio/pdp-v2:next
digestsha256:d4a87fe5dd9a7d02b5458a6514a07de5a402911915370626ee0cc5059ef65a21
vulnerabilitiescritical: 0 high: 3 medium: 6 low: 4 unspecified: 3
platformlinux/amd64
size225 MB
packages264
📦 Base Image python:3.10-alpine3.22
also known as
  • 3.10.20-alpine3.22
digestsha256:c8f94b3bb77e6ea9015ccd091b7f8aec1b1fcbca95159675235d9a93788797cd
vulnerabilitiescritical: 1 high: 13 medium: 12 low: 4
critical: 0 high: 2 medium: 2 low: 1 starlette 0.50.0 (pypi)

pkg:pypi/starlette@0.50.0

high 7.5: CVE--2026--54283 Allocation of Resources Without Limits or Throttling

Affected range>=0.4.1
<1.3.1
Fixed version1.3.1
CVSS Score7.5
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score0.275%
EPSS Percentile20th percentile
Description

Summary

request.form() accepts max_fields and max_part_size to bound resource consumption while parsing form data. These limits are enforced for multipart/form-data, but silently ignored for application/x-www-form-urlencoded. An unauthenticated attacker can therefore send a urlencoded body with an arbitrarily large number of fields or an arbitrarily large field, even when the application configured limits it believed would apply.

Details

request.form() dispatches to a different parser depending on the Content-Type. For multipart/form-data the max_files, max_fields, and max_part_size limits are forwarded to the parser, but for application/x-www-form-urlencoded the parser is constructed without them. It has no max_fields or max_part_size parameter to receive them, and it appends every field with no count check and accumulates each field's name and value with no size check. The configured limits are therefore both unreachable and unenforced for url-encoded bodies.

Because the url-encoded parser does its work synchronously between stream reads, the two attack shapes have different effects:

  • Field count drives CPU and event-loop blocking. A body of ~1,000,000 fields (a sub-10MB payload such as f0=v&f1=v&...) blocks the worker's event loop for several seconds while parsing, during which the worker serves no other request.
  • Field size drives memory. A single large field value (e.g. a 50MB value) is buffered in full to build the FormData, forcing memory allocation proportional to the request body.

The equivalent multipart/form-data request is correctly rejected with 400 Too many fields / 400 Field exceeded maximum size.

Impact

This Denial of service (DoS) vulnerability affects all applications built with Starlette (or FastAPI) that call request.form() on application/x-www-form-urlencoded requests. A single request with a very large number of fields blocks the event loop for several seconds, and a single request with a very large field forces unbounded memory allocation; in either case, parallel requests can render the service unusable. A reverse proxy that enforces a request body size limit reduces but does not eliminate the exposure, since a sub-10MB body is already enough to block the event loop.

Mitigation

Upgrade to a patched version, which forwards max_fields and max_part_size to the url-encoded parser and enforces them while parsing, raising before the oversized field or excess fields are accumulated. The defaults match multipart/form-data (max_fields=1000, max_part_size=1MB) and can be customized via request.form(max_fields=..., max_part_size=...).

high 7.5: CVE--2026--48818 Server-Side Request Forgery (SSRF)

Affected range<1.1.0
Fixed version1.1.0
CVSS Score7.5
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS Score0.368%
EPSS Percentile29th percentile
Description

Summary

When serving static files on Windows, StaticFiles resolves the requested path with os.path.realpath. If a UNC path (such as \\attacker.com\share) reaches the resolver, realpath causes the process to open a connection to the remote host over SMB (port 445). This is a server-side request forgery (SSRF) that leaks the service account's NTLMv2 credentials to the attacker-controlled host, which can then be cracked offline or relayed to other hosts.

Details

StaticFiles.lookup_path() joins the requested path onto the served directory and calls os.path.realpath on the result before checking containment with os.path.commonpath. On Windows, a UNC path is absolute, so os.path.join discards the served directory and realpath resolves the bare UNC path, triggering the outbound SMB connection and NTLM authentication before the containment check rejects the path. The HTTP response is a benign 404, but the credential disclosure has already happened. POSIX systems are not affected.

This only affects the default configuration (follow_symlink=False), which uses os.path.realpath. The follow_symlink=True branch uses os.path.abspath, which performs no I/O.

Impact

Applications running on Windows that serve files with StaticFiles (directly, or via a framework built on Starlette such as FastAPI) in the default configuration are affected. StaticFiles is typically unauthenticated, so any client can trigger the SMB connection and leak the service account's NTLMv2 hash. A secondary impact is discovering internal hosts reachable over SMB by timing responses for valid versus invalid addresses.

Mitigation

Applications not running on Windows are not affected. On Windows, serving static files through a dedicated web server (such as nginx or IIS) instead of StaticFiles avoids the issue. Blocking outbound SMB (port 445) from the application host prevents the credential disclosure even if a UNC path is resolved.

medium 6.5: CVE--2026--48710 Improper Validation of Unsafe Equivalence in Input

Affected range<=1.0.0
Fixed version1.0.1
CVSS Score6.5
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS Score1.438%
EPSS Percentile70th percentile
Description

Summary

In affected versions, the HTTP Host request header was not validated before being used to reconstruct request.url. Because the routing algorithm relies on the raw HTTP path while request.url is rebuilt from the Host header, a malformed header could make request.url.path differ from the path that was actually requested. Middleware and endpoints that apply security restrictions based on request.url (rather than the raw scope path) could therefore be bypassed.

Details

When a client requests http://example.com/foo, it sends:

GET /foo HTTP/1.1
Host: example.com

Affected versions reconstructed the URL by concatenating http://{host}{path} and re-parsing the result. The Host value is only valid as a uri-host [ ":" port ] per RFC 9112 §3.2, where uri-host follows the restricted host grammar of RFC 3986 §3.2.2. When it contains characters outside that grammar - notably /, ?, or # - those characters move the path/query/fragment boundaries during re-parsing, so the parsed request.url.path no longer matches the path the server actually received. For example:

GET /foo HTTP/1.1
Host: example.com/abc?bar=

reconstructs to http://example.com/abc?bar=/foo, whose parsed path is /abc - even though routing used the real path /foo. The router still dispatches to /foo and the endpoint executes, but any middleware or code that reads request.url.path sees /abc, so path-based authorization checks can be bypassed.

Impact

Any application running an affected version that relies on request.url (or request.url.path) for security-sensitive decisions is affected. The most common case is middleware that gates access to certain path prefixes based on request.url.path. Deployments fronted by a proxy or load balancer are mitigated only if that proxy rejects or normalizes the malformed Host header before forwarding and the application does not trust attacker-controlled host headers (e.g. X-Forwarded-Host) elsewhere.

Mitigation

Upgrade to a patched version, which validates the Host header against the grammar of RFC 9112 §3.2 / RFC 3986 §3.2.2 when constructing request.url and falls back to scope["server"] for malformed values.

medium 5.3: CVE--2026--48817 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')

Affected range<1.1.0
Fixed version1.1.0
CVSS Score5.3
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS Score0.213%
EPSS Percentile12th percentile
Description

Summary

When dispatching a request, HTTPEndpoint selects the handler by lowercasing the HTTP method and looking it up as an attribute with getattr, without restricting the lookup to a known set of HTTP verbs.

When an HTTPEndpoint subclass is registered through Route(...) without an explicit methods= argument, the route does not constrain the method and every method reaches the endpoint. If a non-standard HTTP method whose lowercased name matches an attribute on the endpoint subclass reaches the endpoint, that attribute is invoked as if it were a request handler. An attacker can use this to reach methods that were never meant to be HTTP handlers, such as internal helpers, without the authorization checks applied by the intended public handler.

Details

HTTPEndpoint uses the client-supplied method name to resolve an instance attribute, without validating it against the set of HTTP verbs the endpoint supports. A method such as _DO_DELETE therefore resolves an attribute like _do_delete and invokes it. Non-standard methods are valid RFC 9110 token methods, so an endpoint must not treat the method name as a trusted attribute selector.

Impact

An application is affected when all of the following hold:

  • It defines an HTTPEndpoint subclass and registers it via Route(...) without an explicit methods= argument.
  • The subclass defines additional methods whose names match a non-standard HTTP-method token shape and that accept a single request argument and return a response.

This also affects frameworks built on Starlette, like FastAPI.

Mitigation

Register HTTPEndpoint subclasses with an explicit methods= argument on the Route, listing only the HTTP verbs the endpoint supports. The route then rejects any other method with 405 Method Not Allowed before it reaches the endpoint, so non-standard methods cannot resolve an attribute.

low 3.7: CVE--2026--54282 Improper Input Validation

Affected range<1.3.0
Fixed version1.3.0
CVSS Score3.7
CVSS VectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
EPSS Score0.187%
EPSS Percentile9th percentile
Description

Summary

In affected versions, the HTTP request path is not validated before being used to reconstruct request.url. Because request.url is rebuilt by concatenating {scheme}://{host}{path} and re-parsing the result, a path that does not begin with / (for example @<!-- -->google.com) moves the authority boundary during re-parsing, so request.url.hostname and request.url.netloc become attacker-controlled. Code that reads request.url.hostname (rather than the Host header or scope) can therefore be misled into trusting an attacker-supplied host.

Details

When a client requests a path that does not start with /:

GET @<!-- -->google.com HTTP/1.1
Host: localhost

affected versions reconstruct the URL as http://localhost@<!-- -->google.com. Per RFC 3986 §3.2.1, the substring before @ in the authority is userinfo, so re-parsing yields username = "localhost" and hostname = "google.com", with an empty path:

request.url          == "http://localhost@<!-- -->google.com"
request.url.hostname == "google.com"
request.url.path     == ""

The root cause is that the path is concatenated directly after the host without a separating /, and without validating that it begins with one. Only the Host header was validated when constructing request.url; the path was not.

This requires an ASGI server that forwards a request-target lacking a leading / into scope["path"].

Impact

Any application running an affected version that uses request.url, request.url.netloc, or request.url.hostname for a security-sensitive decision (host-based authorization, redirect/callback base, SSRF target, cache key, audit log) may be affected, when no fronting proxy or load balancer rejects the malformed request-target first.

Note that this is less exploitable than GHSA-86qp-5c8j-p5mr: there, the poison is carried in the Host header, so the real path still routes to a valid endpoint while request.url.path lies. Here, the poison must be carried in the path itself, and that path (@<!-- -->google.com) does not match any registered route, so routing returns 404 and no endpoint handler runs. The exposure is limited to code that reads request.url before routing - notably middleware - or in 404/exception handlers.

Mitigation

Upgrade to a patched version, which prevents the request path from crossing into the URL authority. The request above instead yields http://localhost/@<!-- -->google.com with request.url.hostname == "localhost".

critical: 0 high: 1 medium: 0 low: 0 ddtrace 3.19.8 (pypi)

pkg:pypi/ddtrace@3.19.8

high 7.5: CVE--2026--50271 Uncontrolled Resource Consumption

Affected range<4.8.2
Fixed version4.8.2
CVSS Score7.5
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Score0.793%
EPSS Percentile53rd percentile
Description

Impact

Datadog tracing libraries that implement W3C baggage propagation parse incoming baggage HTTP headers without enforcing item-count or byte-size limits on the extract path. The DD_TRACE_BAGGAGE_MAX_ITEMS (default 64) and DD_TRACE_BAGGAGE_MAX_BYTES (default 8192) limits were applied only to baggage injection, not extraction. A remote, unauthenticated attacker can send a request whose baggage header contains an arbitrarily large number of comma-separated key-value pairs (or a single very large value). The tracer allocates a hash-map entry for each pair on every request, causing unbounded CPU and memory consumption and enabling a remote Denial of Service against any HTTP service that has the baggage propagation style enabled.
The baggage propagation style is enabled by default in most affected tracers, so any internet-facing service that has been instrumented with an affected tracer version is exposed unless the propagation style has been explicitly narrowed.

Patches

This is resolved in version 4.8.2 and later of the dd-trace-py library

Workarounds

If users cannot upgrade immediately:

  1. Disable baggage extraction by removing baggage from DD_TRACE_PROPAGATION_STYLE (or DD_TRACE_PROPAGATION_STYLE_EXTRACT if set independently).
  2. Cap the maximum HTTP request header size at an upstream proxy or web server (for example, Apache LimitRequestFieldSize, Nginx large_client_header_buffers, Envoy max_request_headers_kb).

Resources

Related upstream advisories:
opentelemetry-go GHSA-mh2q-q3fh-2475
opentelemetry-dotnet GHSA-g94r-2vxg-569j

critical: 0 high: 0 medium: 2 low: 0 github.com/quic-go/quic-go 0.54.1 (golang)

pkg:golang/github.com/quic-go/quic-go@0.54.1

medium 5.3: CVE--2026--40898 Allocation of Resources Without Limits or Throttling

Affected range<=0.59.0
Fixed version0.59.1
CVSS Score5.3
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS Score0.279%
EPSS Percentile20th percentile
Description

Summary

An attacker can cause excessive memory allocation in quic-go's HTTP/3 client and server implementations by sending a QPACK-encoded HEADERS frame that decodes into a large trailer field section with many unique field names and/or large values. The implementation builds an http.Header for the corresponding http.Request or http.Response, while only enforcing limits on the size of the QPACK-compressed HEADERS frame, not on the decoded field section. This can lead to memory exhaustion.

This is very similar to CVE-2025-64702. The difference is that this issue uses HTTP trailers, rather than HTTP headers, as the attack vector.

Impact

A misbehaving or malicious peer can cause a denial-of-service (DoS) attack against quic-go's HTTP/3 servers or clients by triggering excessive memory allocation, potentially leading to crashes or resource exhaustion. This affects both servers and clients due to symmetric header construction.

Details

In HTTP/3, field sections are compressed using QPACK (RFC 9204). Field sections are used for both HTTP headers and trailers. quic-go's HTTP/3 server and client decode the QPACK-encoded HEADERS frame into header fields, then construct an http.Request or http.Response.

http3.Server.MaxHeaderBytes and http3.Transport.MaxResponseHeaderBytes limit the encoded HEADERS frame size, with defaults of 1 MB for servers and 10 MB for clients. However, they did not limit the decoded field section size. A maliciously crafted HEADERS frame carrying trailers can expand to about 50x the encoded size using QPACK static table entries with long names and/or values.

RFC 9114 requires endpoints to enforce decoded field section size limits via SETTINGS, which quic-go did not do for trailers.

The Fix

quic-go now enforces RFC 9114 decoded field section size limits for trailers as well. It incrementally decodes QPACK entries and checks the field section size after each entry, aborting the stream if an entry causes the limit to be exceeded.

medium 5.3: CVE--2025--64702 Allocation of Resources Without Limits or Throttling

Affected range<0.57.0
Fixed version0.57.0
CVSS Score5.3
CVSS VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS Score0.338%
EPSS Percentile26th percentile
Description

Summary

An attacker can cause excessive memory allocation in quic-go's HTTP/3 client and server implementations by sending a QPACK-encoded HEADERS frame that decodes into a large header field section (many unique header names and/or large values). The implementation builds an http.Header (used on the http.Request and http.Response, respectively), while only enforcing limits on the size of the (QPACK-compressed) HEADERS frame, but not on the decoded header, leading to memory exhaustion.

Impact

A misbehaving or malicious peer can cause a denial-of-service (DoS) attack on quic-go's HTTP/3 servers or clients by triggering excessive memory allocation, potentially leading to crashes or exhaustion. It affects both servers and clients due to symmetric header construction.

Details

In HTTP/3, headers are compressed using QPACK (RFC 9204). quic-go's HTTP/3 server (and client) decodes the QPACK-encoded HEADERS frame into header fields, then constructs an http.Request (or response).

http3.Server.MaxHeaderBytes and http3.Transport.MaxResponseHeaderBytes, respectively, limit encoded HEADERS frame size (default: 1 MB server, 10 MB client), but not decoded size. A maliciously crafted HEADERS frame can expand to ~50x the encoded size using QPACK static table entries with long names / values.

RFC 9114 requires enforcing decoded field section size limits via SETTINGS, which quic-go did not do.

The Fix

quic-go now enforces RFC 9114 decoded field section size limits, sending SETTINGS_MAX_FIELD_SECTION_SIZE and using incremental QPACK decoding to check the header size after each entry, aborting early on violations with HTTP 431 (on the server side) and stream reset (on the client side).

critical: 0 high: 0 medium: 1 low: 0 busybox 1.37.0-r20 (apk)

pkg:apk/alpine/busybox@1.37.0-r20?os_name=alpine&os_version=3.22

medium : CVE--2025--60876

Affected range<=1.37.0-r20
Fixed versionNot Fixed
EPSS Score0.285%
EPSS Percentile21st percentile
Description
critical: 0 high: 0 medium: 1 low: 0 util-linux 2.41-r9 (apk)

pkg:apk/alpine/util-linux@2.41-r9?os_name=alpine&os_version=3.22

medium : CVE--2026--27456

Affected range<=2.41-r9
Fixed versionNot Fixed
EPSS Score0.118%
EPSS Percentile2nd percentile
Description
critical: 0 high: 0 medium: 0 low: 2 github.com/refraction-networking/utls 1.7.3 (golang)

pkg:golang/github.com/refraction-networking/utls@1.7.3

low 2.3: CVE--2026--27017 Use of a Cryptographic Primitive with a Risky Implementation

Affected range>=1.6.0
<1.8.1
Fixed version1.8.1
CVSS Score2.3
CVSS VectorCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
EPSS Score0.154%
EPSS Percentile5th percentile
Description

There is a fingerprint mismatch with Chrome when using GREASE ECH, having to do with ciphersuite selection. When Chrome selects the preferred ciphersuite in the outer ClientHello and the ciphersuite for ECH, it does so consistently based on hardware support. That means, for example, if it prefers AES for the outer ciphersuite, it would also use AES for ECH. The Chrome parrot in utls hardcodes AES preference for outer ciphersuites but selects the ECH ciphersuite randomly between AES and ChaCha20. So there is a 50% chance of selecting ChaCha20 for ECH while using AES for the outer ciphersuite, which is impossible in Chrome.

This is only a problem in GREASE ECH, since in real ECH Chrome selects the first valid ciphersuite when AES is preferred, which is the same in utls. So no change is done there.

Affected symbols: HelloChrome_120, HelloChrome_120_PQ, HelloChrome_131, HelloChrome_133

Fix commit: 24bd1e05a788c1add7f3037f4532ea552b2cee07

Thanks to telegram @acgdaily for reporting this issue.

low 2.3: CVE--2026--26995 Exposure of Sensitive Information to an Unauthorized Actor

Affected range>=1.6.0
<1.8.2
Fixed version1.8.2
CVSS Score2.3
CVSS VectorCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Description

The padding extension was incorrectly removed in utls for the non-pq variant of Chrome 120 fingerprint. Chrome removed this extension only when sending pq keyshares. Only this fingerprint is affected since newer fingerprints have pq keyshares by default and older fingerprints have this extension.

Affected symbols: HelloChrome_120

Fix commit: 8fe0b08e9a0e7e2d08b268f451f2c79962e6acd0

Thanks to telegram @acgdaily for reporting this issue.

critical: 0 high: 0 medium: 0 low: 1 github.com/cloudflare/circl 1.6.1 (golang)

pkg:golang/github.com/cloudflare/circl@1.6.1

low 2.9: CVE--2026--1229 Incorrect Calculation

Affected range<1.6.3
Fixed version1.6.3
CVSS Score2.9
CVSS VectorCVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L/E:P/S:N/AU:Y/U:Amber
EPSS Score0.397%
EPSS Percentile32nd percentile
Description

The CombinedMult function in the CIRCL ecc/p384 package (secp384r1 curve) produces an incorrect value for specific inputs. The issue is fixed by using complete addition formulas.
ECDH and ECDSA signing relying on this curve are not affected.

The bug was fixed in v1.6.3.

critical: 0 high: 0 medium: 0 low: 0 unspecified: 1golang.org/x/net 0.55.0 (golang)

pkg:golang/golang.org/x/net@0.55.0

unspecified : CVE--2026--46600

Affected range<0.56.0
Fixed version0.56.0
EPSS Score0.155%
EPSS Percentile5th percentile
Description

Parsing an invalid SVCB or HTTPS RR can panic when the size of a parameter value overflows the message buffer.

critical: 0 high: 0 medium: 0 low: 0 unspecified: 1golang.org/x/text 0.38.0 (golang)

pkg:golang/golang.org/x/text@0.38.0

unspecified : CVE--2026--56852

Affected range<0.39.0
Fixed version0.39.0
EPSS Score0.222%
EPSS Percentile13th percentile
Description

A norm.Iter can enter an infinite loop when handling input containing invalid UTF-8 bytes.

critical: 0 high: 0 medium: 0 low: 0 unspecified: 1golang.org/x/crypto 0.53.0 (golang)

pkg:golang/golang.org/x/crypto@0.53.0

unspecified : GO--2026--5932

Affected range>=0
Fixed versionNot Fixed
Description

The golang.org/x/crypto/openpgp package is unsafe by design, has numerous known security issues, is not maintained, and should not be used.

If you are required to interoperate with OpenPGP systems and need a maintained package, consider github.com/ProtonMail/go-crypto/openpgp which is a maintained fork that aims to be a drop-in replacement for this package.

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

🔍 Vulnerabilities of permitio/pdp-v2:next

📦 Image Reference permitio/pdp-v2:next
digestsha256:d4a87fe5dd9a7d02b5458a6514a07de5a402911915370626ee0cc5059ef65a21
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
platformlinux/amd64
size225 MB
packages264
📦 Base Image python:3.10-alpine3.22
also known as
  • 3.10.20-alpine3.22
digestsha256:c8f94b3bb77e6ea9015ccd091b7f8aec1b1fcbca95159675235d9a93788797cd
vulnerabilitiescritical: 1 high: 13 medium: 12 low: 4

The Docker Scout gate surfaced a second HIGH beyond the customer's report:
CVE-2026-50271 (CVSS 7.5), a remote DoS in ddtrace's W3C baggage
propagator. The extract path ignores DD_TRACE_BAGGAGE_MAX_ITEMS and
DD_TRACE_BAGGAGE_MAX_BYTES, so an unauthenticated caller can drive
unbounded CPU/memory with an oversized baggage header.

This is not introduced here - main would fail the same gate today; the
advisory simply postdates main's last green run (Jul 14).

The fix is only in ddtrace >= 4.8.2 and opal-common 0.9.6 caps
ddtrace<4, so it cannot be upgraded away. Rather than waive on the
default posture alone, remove the vulnerable parser from the request
path: set DD_TRACE_PROPAGATION_STYLE_EXTRACT=datadog,tracecontext,
dropping "baggage" from ddtrace's default extract styles.

That matters because the exposure is real, just config-gated. ddtrace
only reaches inbound requests when PDP_ENABLE_MONITORING=true (default
false) calls patch(fastapi=True) - but baggage IS in ddtrace's default
extract styles, so anyone who enables monitoring would otherwise be
genuinely exposed. A "not in execute path" waiver would have been false
for them. Injection is left at its default, so outbound baggage
propagation is unchanged.

Waived as inline_mitigations_already_exist, which is accurate for both
the default and monitoring-enabled configurations. ddtrace is pinned to
3.19.8 so the waiver PURL stays bound (no lockfile in the image build).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dshoen619

Copy link
Copy Markdown
Contributor Author

Added: CVE-2026-50271 (ddtrace baggage DoS, HIGH 7.5)

The first Scout run surfaced a second HIGH beyond the two expected findings, so folding the fix in here.

Not introduced by this branchmain would fail the same gate today. Its last green run was Jul 14 and the advisory postdates it; nothing here touches ddtrace.

Why not a plain waiver: the exposure is real but config-gated. ddtrace only reaches the inbound request path when PDP_ENABLE_MONITORING=true (defaults to false) calls patch(fastapi=True) — but baggage is in ddtrace's default extract styles (datadog,tracecontext,baggage), so anyone who enables monitoring would be genuinely exposed to an unauthenticated DoS. A vulnerable_code_not_in_execute_path waiver would have been false for those users.

Mitigation: the image now sets DD_TRACE_PROPAGATION_STYLE_EXTRACT=datadog,tracecontext, removing the unbounded baggage parser from the request path entirely. Injection style is untouched, so outbound baggage propagation still works. Waived as inline_mitigations_already_exist, which holds for both the default and monitoring-enabled configurations.

ddtrace is pinned to ==3.19.8 so the waiver PURL stays bound — the image build has no lockfile, so an unpinned 3.x would drift and silently break the match.

The 4.8.2 fix is blocked by opal-common's ddtrace<4,>=3.0.0 cap, so this joins starlette as upstream-blocked. All of it reverts when OPAL relaxes both caps.

Remaining gate status

The only expected failure left is CVE-2026-50163 (oras-go), which clears once permitio/permit-opa#42 merges — that PR is green and ready.

@dshoen619

Copy link
Copy Markdown
Contributor Author

Tested locally — image builds and runs, no platform regression ✅

Built permitio/pdp-v2:latest from this branch together with permit-opa#42 (the required merge-order companion) and ran it end-to-end in a local full-platform k3d/Tilt environment (backend, OPAL server/client, policy-sync, relay, Postgres/Redis/RabbitMQ).

Build

  • Image builds cleanly with the updated requirements.txt (sqlparse 0.5.5, cryptography>=48.0.1, floor pins) and the Dockerfile apk upgrade / sqlite re-pin layer — no build breakage.
  • OPA binary from permit-opa#42 embedded; go version -m on the shipped binary confirms oras-go v2.6.2 + otlptrace v1.43.0.

Runtime / integration

  • PDP deployed to k3d; booted, fetched config from the control plane, OPAL synced policy + data into OPA (PUT /v1/policies/... → 200).
  • /healthyopa: ok, horizon: ok, overall ok.
  • End-to-end POST /allowedHTTP 200 with correct RBAC + ABAC decision output.

Scope note: this validates the image still builds and runs with the requirements/Dockerfile changes. The OpenVEX waiver additions + Docker Scout CVE gate are validated separately in CI (they don't affect runtime).

🤖 Tested with Claude Code

@dshoen619 dshoen619 changed the title fix: clear remaining pdp-v2 image CVEs from customer scan (PER-15358) [PER-15532] fix: clear remaining pdp-v2 image CVEs from customer scan (PER-15358) Jul 24, 2026

@EliMoshkovich EliMoshkovich left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please re-check it over staging as well , right after you'll merge it

@dshoen619
dshoen619 merged commit 8b9b17f into main Jul 24, 2026
29 of 33 checks passed
@dshoen619
dshoen619 deleted the david/fix-remaining-image-cves-sqlparse-otel-vex branch July 24, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants