Security Advisory: Protection Against the Java4Shell (CVE-2026-114938) OpenJDK Base64 Decoder Vulnerability
Overview
On November 17, 2026, Oracle and the OpenJDK project released security updates addressing CVE-2026-114938 (Java4Shell), a memory corruption vulnerability in the Java runtime with a CVSS 4.0 score of 9.2. The flaw resides in the AVX-512 VBMI accelerated path of the java.util.Base64 decoder. Where a Base64 string carries one surplus trailing padding character, output length computation underflows and the decoder writes beyond the allocated output buffer before Java validates and rejects the input. The subsequent exception does not undo the memory corruption. Where the out-of-bounds write overwrites length fields of adjacent heap objects, out-of-bounds read and write primitives become available, producing a JVM crash or disclosure of process memory; where application heap layout conditions are met, unauthenticated remote code execution is achievable.
HTTP Basic credentials, SAML assertions, CSRF tokens, JWTs, and application tickets are commonly Base64-encoded. Where an application decodes such values before authentication completes, a malformed Base64 string reaches the decoder through an unauthenticated request, and exploitation does not require valid credentials.
EdgeOne blocks requests carrying malformed Base64 at the edge, limiting exposure before origin runtimes are upgraded.
Affected Scope
| Java release line | Fixed build |
|---|---|
| Java 17 | 17.0.21.1 |
| Java 21 | 21.0.13.1 |
| Java 25 | 25.0.5.1 |
| Java 27 | 27.0.1.1 |
- Affected runtimes: OpenJDK 17.0.6 and later on the 17, 21, 25, and 27 lines, together with Oracle Java SE, Oracle GraalVM, Eclipse Temurin, Amazon Corretto, Azul Zulu, and Microsoft Build of OpenJDK distributions. OpenJDK 8 and 11 do not contain the accelerated decoder; the Oracle Java SE 8 Enterprise Performance Pack (8u511b33-perf) is separately affected.
- Platform conditions: x86-64 processors with AVX-512 VBMI support (Intel Ice Lake or later, AMD Zen 4 or later). ARM64 hosts and x86-64 hosts without the instruction set are unaffected.
- Application conditions: attacker-controlled Base64 data reaching the JIT-compiled decoder path. Unauthenticated triggering has been reproduced in default configurations of Keycloak, Jira, Confluence, JFrog Artifactory, Jenkins, and PingFederate; Kafka, Solr, Elasticsearch, Gerrit, and Spinnaker require authentication.
Protection with EdgeOne
Web Protection custom rules evaluate Base64 values in requests at the edge and block malformed input before it reaches the origin.
- Matching positions: The matching field is determined by the position carrying the ticket or credential, and the expression applies to the value at that position. The pattern covers the majority of request locations that carry Base64 tickets and credentials.
- Custom Request Header: a header is located by name and the expression applies to the header value.
- Request Cookie: a parameter is located by name and the expression applies to the parameter value.
- Request URL, Request Path, and Request Body: regular expression matching is supported.
- Scope: Rules apply to HTTP/HTTPS requests served through EdgeOne; where Base64 data originates from in-process calls, non-HTTP entry points, or connections initiated by an outbound Java client, coverage is provided by upgrading the runtime at the origin.
Upgrading the Java Runtime
Upgrading the Java runtime is recommended as the primary remediation. Edge custom rules block exploitation traffic before it reaches the decoder and do not change the vulnerable state of the origin runtime.
- Oracle Java SE builds 17.0.21.1, 21.0.13.1, 25.0.5.1, and 27.0.1.1 contain the fix. Where a distribution such as Eclipse Temurin, Amazon Corretto, Azul Zulu, or Microsoft Build of OpenJDK is in use, the corresponding vendor advisory applies.
- Where a Java runtime is bundled with an application, container base image, or appliance, that runtime is updated alongside the primary runtime; images are rebuilt and redeployed, and JVM processes restarted.
- Where multiple systems await upgrading, internet-facing systems and authentication services take priority.
- Where immediate upgrading is not feasible, the JVM flag
-XX:-UseBASE64Intrinsicsdisables the accelerated Base64 decoder on x86-64 hosts.-XX:UseAVX=2disables AVX-512 and is not supported on ARM hosts. Both flags require a JVM restart.
Appendix: Custom Rule Configuration Examples
Example: HTTP Basic Authentication Header
Where HTTP Basic authentication is used, the Base64 segment following Basic in the Authorization header is passed to the decoder. The corresponding rule is configured under Web Protection > Custom Rules > Precise Matching Rules:
- Matching condition: Custom Request Header; header name:
Authorization; operator: Regular Expression Match; value (detects surplus padding after the Basic credential):
^Basic\s+(?:(?:[A-Za-z0-9+/]{4}){16,}={1,2}|[A-Za-z0-9+/]+={3,})$- Action: Block
Matching Other Request Positions
Where a ticket or credential is carried in a custom request header, cookie parameter, URL parameter, or request body, the rule is configured under Web Protection > Custom Rules > Precise Matching Rules with operator Regular Expression Match and action Block. Value (detects surplus padding after a Base64 encoded segment):
^(?:[A-Za-z0-9+/]{4}){16,}={1,2}$|[A-Za-z0-9+/]+={3,}$Matching fields locate the position carrying the ticket or credential, and the expression applies to the value at that position:
- Custom Request Header: Where a ticket is carried in a header such as X-Auth-Token or X-Session-Ticket, the matching field specifies that header name and the expression applies to the header value.
- Request Cookie: Where a session ticket or remember-me credential is carried in a cookie, the matching field specifies that parameter name and the expression applies to the parameter value.
- Request URL and Request Path: Where a Base64 parameter is located in the URL or query string, the expression applies to that parameter.
- Request Body: Where a Base64 field is located in JSON, form, or MIME content, the expression applies to that field.
SAML Assertion
The SAMLResponse form field in HTTP-POST binding uses standard Base64 encoding; the SAMLResponse query parameter in HTTP-Redirect binding uses base64url encoding without padding.
- HTTP-POST binding: Matching condition: Request Body; operator: Regular Expression Match; value (detects surplus padding at the end of the SAMLResponse form field):
(?:^|&)SAMLResponse=(?:[A-Za-z0-9+/]{4}){16,}(?:=|%3[dD]){1,2}(?:&|$)|(?:^|&)SAMLResponse=[A-Za-z0-9+/]+(?:=|%3[dD]){3,}(?:&|$)Action: Block.
- HTTP-Redirect binding: Matching condition: Request URL; operator: Regular Expression Match; value (detects padding characters in the SAMLResponse query parameter):
(?i)[?&]SAMLResponse=[A-Za-z0-9_-]*(?:=|%3D)Action: Block.
Note: Where a site uses SAML login, the rule is deployed for the binding used by the IdP.
JWT
Where an application parses JWT segments with the URL decoder in java.util.Base64, that decoding path is affected by the vulnerability; JWT segments compliant with RFC 7515 carry no padding.
Authorization: Bearer: Matching condition: Custom Request Header; header name:Authorization; operator: Regular Expression Match; value (detects padding characters in the Bearer value):^Bearer\s+[A-Za-z0-9_.-]*=; action: Block.- Cookie: Matching condition: Request Cookie with the parameter name holding the JWT; operator: Regular Expression Match; value (detects padding characters in the cookie value):
^[A-Za-z0-9_.-]*=; action: Block.
Note: Where a JWT implementation emits padding, values containing = are identified as malformed.
CSRF Token
A CSRF token that uses standard Base64 encoding is configured by carrying position. Value (detects surplus padding after a Base64 encoded segment):
^(?:[A-Za-z0-9+/]{4}){16,}={1,2}$|[A-Za-z0-9+/]+={3,}$- Custom Request Header: Matching condition: Custom Request Header; header name:
X-CSRF-TOKEN; operator: Regular Expression Match; action: Block. - Request Cookie: Matching condition: Request Cookie with the parameter name holding the token; operator: Regular Expression Match; action: Block.
- Request Body: Matching condition: Request Body; operator: Regular Expression Match; action: Block.
Where a token uses base64url encoding without padding, the value ^[A-Za-z0-9_-]*= detects padding characters in the token.
Note: Where CSRF validation is enabled, Base64 encoding usage, encoding form, and carrying position are confirmed against the application framework before deployment.
Notes
- Where a rule is newly deployed, Observe is configured as the action; after matched logs and production value formats have been reviewed, the action is set to Block.
- The Request Body matching condition applies to the first 8 KB of the request body by default; where scanning beyond 8 KB is required, please contact technical support to adjust the configuration.

