Add virtual patches for Java4Shell (CVE-2026-114938) and OwnTracks Recorder (CVE-2026-131852) #26

Merged
james merged 5 commits from java4shell-virtual-patch into main 2026-11-19 02:00:33 +00:00
Owner

Adds two virtual patches to the embedded WAF.

1014938 Java4Shell (CVE-2026-114938). Out-of-bounds write in HotSpot's AVX-512 Base64 decode intrinsic (OpenJDK 17.0.6+, x86-64 with AVX-512 VBMI), reachable pre-auth anywhere an app decodes Base64: Basic credentials, SAML, tokens, cookies, MIME encoded words. Matches 64+ contiguous Base64 characters followed by padding the intrinsic miscounts (=, ==, X=, X==, XY=, === after whole groups). Correct Base64 never has this shape. Inspects headers, cookies, args, JSON, XML, multipart part headers and raw bodies.

1031852 OwnTracks Recorder (CVE-2026-131852). Stored location fields reach printf as the format string. Matches a printf conversion (positional, * width/precision, %% skipped) in the JSON fields or raw body of a request to /pub or /pub/, after decoding \u escapes.

README and DEPLOY.md document both, their limits, and the real fixes (-XX:-UseBASE64Intrinsics / patched JDKs; Recorder 1.0.5). README also notes that Apache httpd mod_http2 CVE-2026-119618 is HTTP/2 framing and out of WAF reach.

Known limits (deliberate)

  • Java4Shell: Base64 inside multipart file content is not inspected (Coraza does not expose it in REQUEST_BODY). Values split by whitespace for the MIME decoder are not matched: the AVX-512 path appears to skip MIME input (not confirmed by the advisories), and counting whitespace would break the mod-4 count and cause false positives.
  • OwnTracks: every /pub field is checked, not just tid/addr/ssid, because Recorder stores the whole payload and upstream PR #589 fixed every output path. MQTT never reaches the WAF.

Review

Four rounds of adversarial review (Crush/GPT) plus a test-coverage review; final verdict approve. Fixed along the way: non-JSON Content-Type bypass, % escapes, missing conversions (%m, %a, %e, ...), %% false positive, positional * width, raw-body coverage for Java4Shell.

Testing

  • make test and make vet pass.
  • New exploit and benign cases in TestVirtualPatchesMatchExploits / TestVirtualPatchesIgnoreBenign.
  • centinela-eval on eval/dataset.jsonl: neither rule fires.
Adds two virtual patches to the embedded WAF. **1014938 Java4Shell (CVE-2026-114938).** Out-of-bounds write in HotSpot's AVX-512 Base64 decode intrinsic (OpenJDK 17.0.6+, x86-64 with AVX-512 VBMI), reachable pre-auth anywhere an app decodes Base64: Basic credentials, SAML, tokens, cookies, MIME encoded words. Matches 64+ contiguous Base64 characters followed by padding the intrinsic miscounts (`=`, `==`, `X=`, `X==`, `XY=`, `===` after whole groups). Correct Base64 never has this shape. Inspects headers, cookies, args, JSON, XML, multipart part headers and raw bodies. **1031852 OwnTracks Recorder (CVE-2026-131852).** Stored location fields reach printf as the format string. Matches a printf conversion (positional, `*` width/precision, `%%` skipped) in the JSON fields or raw body of a request to `/pub` or `/pub/`, after decoding `\u` escapes. README and DEPLOY.md document both, their limits, and the real fixes (`-XX:-UseBASE64Intrinsics` / patched JDKs; Recorder 1.0.5). README also notes that Apache httpd mod_http2 CVE-2026-119618 is HTTP/2 framing and out of WAF reach. ### Known limits (deliberate) - Java4Shell: Base64 inside multipart file content is not inspected (Coraza does not expose it in `REQUEST_BODY`). Values split by whitespace for the MIME decoder are not matched: the AVX-512 path appears to skip MIME input (not confirmed by the advisories), and counting whitespace would break the mod-4 count and cause false positives. - OwnTracks: every `/pub` field is checked, not just `tid`/`addr`/`ssid`, because Recorder stores the whole payload and upstream PR #589 fixed every output path. MQTT never reaches the WAF. ### Review Four rounds of adversarial review (Crush/GPT) plus a test-coverage review; final verdict approve. Fixed along the way: non-JSON Content-Type bypass, `%` escapes, missing conversions (`%m`, `%a`, `%e`, ...), `%%` false positive, positional `*` width, raw-body coverage for Java4Shell. ### Testing - `make test` and `make vet` pass. - New exploit and benign cases in `TestVirtualPatchesMatchExploits` / `TestVirtualPatchesIgnoreBenign`. - `centinela-eval` on `eval/dataset.jsonl`: neither rule fires.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Inspect the raw body when it is not parsed as JSON, decode \u escapes,
cover the remaining printf conversions, skip escaped %% and match /pub/.
Add the edge cases both reviews asked for.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Document the Java4Shell and OwnTracks Recorder virtual patches
All checks were successful
test / laya (pull_request) Successful in 4s
test / go (pull_request) Successful in 4m13s
security-scan / security-scan (pull_request) Successful in 31s
00e078c9e0
Co-Authored-By: Claude Opus 5.5 <[email protected]>

🔎 ojo scan results

No findings.

<!-- ojo-scan-summary --> ### 🔎 ojo scan results No findings.
james merged commit fe30c35ffa into main 2026-11-19 02:00:33 +00:00
james deleted branch java4shell-virtual-patch 2026-11-19 02:00:34 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ColibriSec/centinela!26
No description provided.