critical

CVE

CVE-2026-119418, CVE-2026-119419, CVE-2026-119417, CVE-2026-119416, CVE-2026-119415, CVE-2026-119574, CVE-2026-121966, CVE-2026-119716, CVE-2026-119717

CWE

CWE-89, CWE-94, CWE-1336, CWE-362, CWE-93, CWE-20, CWE-287

Affected Surface

  • Packagist `cakephp/cakephp` `<= 5.4.3` (`CVE-2026-119418`, `CVE-2026-119419`, `CVE-2026-119416`, `CVE-2026-119415`, and `CVE-2026-119417`)
  • Go module `github.com/traefik/traefik/v3` `>= v3.2.0, < v3.7.15` when `experimental.fastProxy` is enabled (`CVE-2026-119574` / `GHSA-ww7c-q3mv-xx22`), and Traefik `2.x < 2.11.60` / `3.x < 3.7.16` when `ForwardAuth` or `auth-url` is used (`CVE-2026-121966` / `GHSA-hrpp-p4fc-wwf8`, CVSS 8.7 High)
  • PyPI `pybars3` `<= 0.9.7` (`CVE-2026-119716`) and `pybars4` `<= 0.9.13` (`CVE-2026-119717`)

Update, 5 November 2026: On 4 November 2026 (16:17 UTC), NVD and Traefik published CVE-2026-121966 (GHSA-hrpp-p4fc-wwf8, CVSS 8.7 High) affecting Traefik 2.x < 2.11.60 and 3.x < 3.7.16. Because Traefik sent ForwardAuth middleware subrequests (and Ingress NGINX auth-url annotation subrequests in 3.7) through a single shared HTTP keep-alive connection pool to the authentication server, connection-bound authentication schemes such as Windows NTLM and SPNEGO/Kerberos (Negotiate) persisted on the pooled backend TCP socket and bled the authenticated user’s identity to subsequent unrelated clients’ ForwardAuth subrequests. Upgrade Traefik to v3.7.16 or v2.11.60.

TL;DR

On 30 October 2026, eight vulnerabilities were published across CakePHP (cakephp/cakephp), Traefik (github.com/traefik/traefik/v3), and the Python Handlebars compilers pybars3 and pybars4:

  1. Five vulnerabilities in CakePHP <= 5.4.3 (CVE-2026-119418, CVE-2026-119419, CVE-2026-119417, CVE-2026-119416, and CVE-2026-119415):
    • Two critical SQL injection paths (CVE-2026-119418 and CVE-2026-119419, both CVSS v4.0 9.2 Critical / v3.1 8.1 High): In src/Database/Expression/WindowExpression.php, range(), frame(), partition(), and orderBy() interpolated string offsets, frame directions, and field names directly into the generated OVER (...) SQL clause without validation (CVE-2026-119418). In src/Database/Expression/IdentifierExpression.php and StringExpression.php, the constructor and setCollation() appended $this->collation directly after COLLATE without checking that it was a single identifier (CVE-2026-119419).
    • Cookie domain suffix spoofing (CVE-2026-119416, CVSS v4.0 6.3 Medium): CookieCollection::findMatchingCookies() matched a cookie’s domain against the request host with preg_match('/' . preg_quote($domain, '/') . '$/', $host) without requiring a leading . separator on partial matches, so a cookie scoped to example.com was sent to attackerexample.com.
    • Bare \r / \n mail and MIME header injection (CVE-2026-119417 / GHSA-2qh5-382h-3jpc and CVE-2026-119415, both CVSS v4.0 6.3 Medium): The earlier fix for CVE-2026-77634 in MailTransport and SmtpTransport used str_replace("\r\n", '', $val), allowing a standalone \r or \n byte to inject Bcc: or body content (CVE-2026-119417), while FormDataPart::__toString() did not strip newlines from Content-Disposition, Content-Type, Content-Transfer-Encoding, or Content-ID (CVE-2026-119415).
  2. Traefik v3.2.0 to v3.7.14 FastProxy crash on HTTP/1 protocol upgrades (CVE-2026-119574 / GHSA-ww7c-q3mv-xx22, CVSS v4.0 8.2 High): When experimental.fastProxy is enabled, a 101 Switching Protocols response (such as a WebSocket upgrade) causes the connection pool and the tunnel copier to read concurrently from the same unsynchronized bufio.Reader, allowing an unauthenticated client that repeatedly opens and aborts upgraded connections to trigger an unrecovered panic that terminates the entire Traefik process. Fixed in Traefik v3.7.15.
  3. Unpatched Python code injection in pybars3 <= 0.9.7 (CVE-2026-119716) and pybars4 <= 0.9.13 (CVE-2026-119717, both CVSS v4.0 9.2 Critical / v3.1 8.1 High): Unlike JavaScript Handlebars, pybars3 and pybars4 compile Handlebars templates into Python source code and pass that string to exec(). When compiling a path argument inside a helper or block expression (such as {{#with [...]}}), the OMeta grammar in pybars/_compiler.py joins bracket-quoted path segments directly into a single-quoted Python string literal (u"resolve(context, u'" + u"', u'".join(segments) + u"')") without escaping single quotes, giving any template author immediate Python RCE.

What to do now: In CakePHP applications (<= 5.4.3), apply the upstream commits from 4.next / 5.x (or upgrade as soon as 5.4.4 / 5.3.8 / 4.6.6 is tagged on Packagist) and audit any code that passes request parameters to WindowExpression, IdentifierExpression, StringExpression, or FunctionsBuilder. Upgrade Traefik to v3.7.15 (or disable experimental.fastProxy). If your Python service compiles user-supplied Handlebars templates with pybars3 or pybars4, treat template compilation as equivalent to eval() and migrate to a non-code-generating engine or block bracketed path segments containing ', \, or newlines before calling Compiler().compile().

Affected packages and projects

EcosystemPackageCVE / AdvisorySeverityAffected versionsFixed version / StatusVulnerable location
Packagistcakephp/cakephpCVE-2026-119418CVSS v4.0 9.2 Critical (v3.1 8.1 High)<= 5.4.3Patched on 4.next/5.x (commit a5ca1748dc, PR #19735)range(), frame(), partition(), and orderBy() in src/Database/Expression/WindowExpression.php
Packagistcakephp/cakephpCVE-2026-119419CVSS v4.0 9.2 Critical (v3.1 8.1 High)<= 5.4.3Patched on 4.next/5.x (commit ac07372e6a, PR #19726)__construct() and setCollation() in IdentifierExpression.php and StringExpression.php
Packagistcakephp/cakephpCVE-2026-119416CVSS v4.0 6.3 Medium (v3.1 4.8 Medium)<= 5.4.3Patched on 4.next/5.x (commit 5d9d01a91f, PR #19702)findMatchingCookies() in src/Http/Cookie/CookieCollection.php
Packagistcakephp/cakephpCVE-2026-119417 (GHSA-2qh5-382h-3jpc), CVE-2026-119415CVSS v4.0 6.3 Medium (v3.1 3.7 Low)<= 5.4.3 (4.5.12, 4.6.5, 5.1.8..5.1.10, 5.2.14..5.2.15, 5.3.7, 5.4.0..5.4.3)Patched on 4.next/5.x (commit 2b9326ca3f, c9a91149f0)MailTransport.php, SmtpTransport.php, and FormDataPart.php
Gogithub.com/traefik/traefik/v3CVE-2026-119574 (GHSA-ww7c-q3mv-xx22)CVSS v4.0 8.2 High (v3.1 5.9 Medium)>= v3.2.0, <= v3.7.14 (experimental.fastProxy enabled)v3.7.15Experimental FastProxy connection pool / HTTP/1 upgrade handler
PyPIpybars3CVE-2026-119716CVSS v4.0 9.2 Critical (v3.1 8.1 High)<= 0.9.7 (latest on PyPI)Unpatched (wbond/pybars3#88)compile_grammar (path / complexarg) in pybars/_compiler.py
PyPIpybars4CVE-2026-119717CVSS v4.0 9.2 Critical (v3.1 8.1 High)<= 0.9.13 (latest on PyPI)Unpatchedcompile_grammar (path / complexarg) in pybars/_compiler.py

Technical analysis

1. CakePHP WindowExpression and COLLATE SQL injection (CVE-2026-119418 and CVE-2026-119419)

In CakePHP’s query builder (<= 5.4.3 on Packagist as of 30 October 2026), parameterized values bound via Query::where() are sent as prepared-statement placeholders, but structural SQL tokens inside low-level Expression classes are emitted directly into the SQL string by sql(ValueBinder $binder).

Reported by Abraxas Labs, SunKimsroul, and Akinlabi, CVE-2026-119418 and CVE-2026-119419 target two expression classes that accepted arbitrary strings without validation:

  1. WindowExpression::range(), frame(), partition(), and orderBy() (CVE-2026-119418): When building an OVER (...) window clause, frame() stored $startOffset, $endOffset, $startDirection, and $endDirection and sql() concatenated them directly into RANGE BETWEEN <offset> <direction> AND ....
  2. IdentifierExpression and StringExpression collation (CVE-2026-119419): Both classes accepted a $collation string in __construct() or setCollation() and emitted COLLATE {$this->collation} verbatim across all database drivers.

To close both vectors without maintaining per-driver collation allowlists, Mark Story added QueryExpression::ensureSimpleString() in commit ac07372e6a (PR #19726) and wired it into WindowExpression and FunctionExpression in commit a5ca1748dc (PR #19735):

--- a/src/Database/Expression/QueryExpression.php
+++ b/src/Database/Expression/QueryExpression.php
@@ -785,4 +785,20 @@ public function __clone()
+    public static function ensureSimpleString(string $parameterName, string $value): void
+    {
+        if (preg_match('/^(?:")?[a-zA-Z0-9_\.]+(?:")?$/', $value)) {
+            return;
+        }
+        throw new InvalidArgumentException("Argument `{$parameterName}` must be an alphanumeric string");
+    }
 }
--- a/src/Database/Expression/WindowExpression.php
+++ b/src/Database/Expression/WindowExpression.php
@@ -180,6 +191,15 @@ public function frame(
         ExpressionInterface|string|int|null $endOffset,
         string $endDirection,
     ) {
+        if (is_string($startOffset)) {
+            QueryExpression::ensureSimpleString('startOffset', $startOffset);
+        }
+        if (is_string($endOffset)) {
+            QueryExpression::ensureSimpleString('endOffset', $endOffset);
+        }
+        QueryExpression::ensureSimpleString('startDirection', $startDirection);
+        QueryExpression::ensureSimpleString('endDirection', $endDirection);

In the same patch series, commit 5d9d01a91f (CVE-2026-119416) replaced the unanchored regex preg_match('/' . preg_quote($domain, '/') . '$/', $host) in CookieCollection::findMatchingCookies() with an explicit RFC 6265 check requiring either $host === $domain or a . boundary ($dotDomain = ".{$domain}"), and commit 2b9326ca3f (CVE-2026-119417) changed str_replace("\r\n", '', $val) to str_replace(["\r", "\n"], '', $val) in MailTransport and SmtpTransport.

2. pybars3 and pybars4: unescaped bracketed path segments in pybars/_compiler.py (CVE-2026-119716 and CVE-2026-119717)

Developers adopting pybars3 (<= 0.9.7) or its fork pybars4 (<= 0.9.13) as a Python port of Handlebars frequently assume that Handlebars templates are logic-less and cannot execute arbitrary Python code. Under the hood, however, pybars uses an OMeta grammar (compile_grammar in pybars/_compiler.py) to translate each template into a Python function render(context, helpers=None, partials=None, root=None) and compiles that generated Python source with exec().

Handlebars supports bracketed literal notation (foo.[bar]) so templates can look up dictionary keys containing dots, spaces, or quotes. When a template uses a single-segment path at the top level ({{[...]}}), CodeBuilder.add_escaped_expand() escapes single quotes inside the segment. However, on lines 159 and 160 of pybars/_compiler.py (0.9.7 in pybars3, lines 153 and 154 in pybars4 0.9.13), multi-segment paths and complexarg arguments passed to block helpers ({{#with ...}}, {{#each ...}}, or custom helpers) join the raw parsed segments directly into a single-quoted Python string literal without escaping ' or \:

# pybars/_compiler.py lines 158-161 (pybars3 0.9.7 / pybars4 0.9.13)
path ::= [ "path" [<pathseg>:segment]] => ("simple", segment)
 | [ "path" [<pathseg>+:segments] ] => ("complex", u"resolve(context, u'" + u"', u'".join(segments) + u"')" )
complexarg ::= [ "path" [<pathseg>+:segments] ] => u"resolve(context, u'" + u"', u'".join(segments) + u"')"
    | [ "subexpr" ["path" <pathseg>:name] [<arg>*:arguments] ] => u'resolve_subexpr(helpers, "' + name + '", context' + (u', ' + u', '.join(arguments) if arguments else u'') + u')'

As demonstrated in vladko312’s advisory, passing a template with a bracketed segment containing ' + <python_expr> + ' inside a #with block breaks out of u'...' inside resolve(context, u'...'):

{{#with ['+str(result.append(__import__('os').popen('id').read()))+']}}{{/with}}

When Compiler().compile() runs, the generated Python function contains:

value = resolve(context, u''+str(result.append(__import__('os').popen('id').read()))+'')

Executing the compiled template immediately runs os.popen('id').read() in the Python process. Neither pybars3 nor pybars4 has released a patched version on PyPI.

3. Traefik v3.7.15 FastProxy bufio.Reader data race (CVE-2026-119574 / GHSA-ww7c-q3mv-xx22)

In Traefik v3.2.0 through v3.7.14, enabling the experimental high-performance reverse proxy (experimental.fastProxy: true) uses a custom HTTP/1 backend connection pool. When a backend responds with 101 Switching Protocols (such as a WebSocket upgrade), the tunnel copier begins reading upgraded frames from the connection’s bufio.Reader while the connection pool’s read loop continues reading from the same bufio.Reader without synchronization. By opening and immediately aborting upgraded connections in a loop, an unauthenticated remote client corrupts the bufio.Reader slice bounds and triggers an unrecovered Go runtime panic that crashes the entire Traefik proxy process. Traefik v3.7.15 fixes the race; note that v3.2 through v3.6 are end-of-life and must be upgraded to v3.7.15.

Detection and remediation

# 1. Check Composer lockfiles for cakephp/cakephp <= 5.4.3
rg -n '"name":\s*"cakephp/cakephp"|"version":' -A 2 composer.lock 2>/dev/null

# 2. Audit CakePHP codebases for WindowExpression, IdentifierExpression, or StringExpression with non-literal inputs
rg -n '(WindowExpression|IdentifierExpression|StringExpression|setCollation|->range\(|->frame\()' --glob '*.php' . 2>/dev/null

# 3. Check Python environments and lockfiles for pybars3 or pybars4
pip show pybars3 pybars4 2>/dev/null || true
rg -n 'pybars[34]' requirements*.txt pyproject.toml uv.lock poetry.lock Pipfile.lock 2>/dev/null

# 4. Check Traefik configs for experimental.fastProxy
rg -n 'fastProxy' traefik*.{yml,yaml,toml} docker-compose*.{yml,yaml} k8s/ helm/ 2>/dev/null
  1. Patch CakePHP (CVE-2026-119418, CVE-2026-119419, CVE-2026-119416, CVE-2026-119417, CVE-2026-119415): Apply commits ac07372e6a, a5ca1748dc, 5d9d01a91f, 2b9326ca3f, and c9a91149f0 (or upgrade cakephp/cakephp as soon as 5.4.4 / 5.3.8 / 4.6.6 lands on Packagist), and ensure any user-supplied collation or window frame parameter is validated against /^[a-zA-Z0-9_.]+$/.
  2. Upgrade Traefik to v3.7.15 (CVE-2026-119574): If you cannot upgrade immediately, set experimental.fastProxy=false in your Traefik static configuration.
  3. Eliminate untrusted template compilation in pybars3 / pybars4 (CVE-2026-119716, CVE-2026-119717): Because both packages remain unpatched on PyPI, do not pass user-controlled strings to pybars.Compiler().compile() or precompile(). If you maintain an internal fork, escape \\, ', \r, and \n in every segment inside path and complexarg in pybars/_compiler.py before joining them into resolve(context, ...).

Timeline

  • 2026-10-13 to 2026-10-23: Mark Story commits the CakePHP fixes for CVE-2026-119417 (2b9326ca3f), CVE-2026-119415 (c9a91149f0), CVE-2026-119416 (5d9d01a91f), CVE-2026-119419 (ac07372e6a), and CVE-2026-119418 (a5ca1748dc).
  • 2026-10-16: Traefik publishes GHSA-ww7c-q3mv-xx22 and ships v3.7.15.
  • 2026-10-30 (12:16 to 16:17 UTC): NVD publishes CVE-2026-119415 through CVE-2026-119419 for CakePHP, CVE-2026-119574 for Traefik, and CVE-2026-119716 / CVE-2026-119717 for pybars3 and pybars4.

From research to remediation

Check whether this pattern exists in your codebase

Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.

References