Java4Shell (CVE-2026-114938): What It Means for TeamCity

Check your BMI

Summary

On November 17, 2026, CVE-2026-114938, a memory-corruption vulnerability in the hardware-accelerated Base64 decoder of several Java runtimes, was publicly disclosed. This vulnerability allows malicious Base64 input to corrupt JVM process memory, potentially causing a crash or remote code execution.

The issue is not a vulnerability in TeamCity itself. However, TeamCity’s server and build agents run on Java versions that may contain the vulnerable code. Our security assessment has identified a potential exploitation scenario, so we strongly recommend updating to the latest version to mitigate the risk.

Recommended actions:

  • TeamCity On-Premises: Review every server node and build agent, and apply one of the mitigations described below. The complete fix is to update the Java runtime used by each component. You can apply an interim JVM flag if an immediate update is not possible.
  • TeamCity Cloud: Servers and JetBrains-hosted agents are not affected. However, you should still review the Java runtimes used by self-hosted build agents.

Details

The vulnerability is in an optimized Base64 decoder that affects Java runtimes used on x86-64 processors with AVX-512 Vector Byte Manipulation Instructions (VBMI). When an application passes attacker-controlled Base64 input to the affected decoder, the decoder can write past the end of a heap buffer and corrupt process memory. The impact depends on how the application handles that input.

Exposure is limited to systems that meet both of the following conditions:

  • They use Java 17, 21, 25, 27, or Oracle Java 8 Performance Pack (version 8u511-perf or earlier), without the appropriate security fix.
  • They use an x86-64 processor with AVX-512 VBMI.

Since TeamCity is a Java application, the exposure of its server and build agents depends on the underlying Java runtime.

What you need to do

1. Identify affected hosts

A host is affected if both of the following conditions are true. Run the relevant checks on every server node and build agent, including inside Docker containers.

  1. The Java version is older than the fixed version listed below. Note that TeamCity might not use the same Java version as the one in PATH. You can also check the version in the server or agent startup logs.
java -version
  1. The CPU supports the AVX-512 VBMI set extension:
  • Linux
# Affected if returns "avx512vbmi"
grep -Eom1 'avx512_?vbmi' /proc/cpuinfo
  • macOS (Intel only)
# Affected if returns "AVX512VBMI"
sysctl -n machdep.cpu.leaf7_features | grep -ow AVX512VBMI
  • Windows (PowerShell 7.4+)
# Affected if returns "True"
[System.Runtime.Intrinsics.X86.Avx512Vbmi]::IsSupported

2. Mitigate

There are two mitigation options:

  • Option A (recommended): Update the Java runtime.
  • Option B: If an immediate update is not possible, disable the vulnerable intrinsic as an interim mitigation.

After performing either option, check the result as described in the Verify section below.

Option A: Update the Java runtime

Update each affected runtime to a fixed build – one of the versions below or a newer one:

Release line Oracle / OpenJDK Amazon Corretto
17 17.0.21.1 17.0.21.1.2
21 21.0.13.1 21.0.13.1.2
25 25.0.5.1 25.0.5.1.2
27 27.0.1.1 27.0.1.1.4
8 (Oracle Performance Pack only) 8u513-perf Corretto 8 is not affected
voucher card

For other distributions, use the fixed build from your Java vendor.

  • Server: Follow the instructions on the Install non-bundled version of Java page of the TeamCity documentation. Note that <TeamCity Home>/jre takes precedence over JAVA_HOME.
  • Agent: Follow the instructions on the Path to Java on Agent Machine documentation page.
  • TeamCity Docker images: The images for TeamCity 2026.1.6 and 2026.2.2 have been republished with a patched Java runtime – the TeamCity versions themselves remain unchanged. We recommend updating to these images. If upgrading is not feasible, follow these instructions to patch your existing images.

Restart each component and recreate Docker containers.

Option B: Disable the vulnerable intrinsic

Both of the following JVM options prevent the vulnerable code from running. Use only one of them.

  1. Disable the accelerated Base64 routines. The JVM stops using the hardware-accelerated Base64 code and uses regular compiled code instead. This affects the performance of Base64-heavy workloads:
 -XX:-UseBASE64Intrinsics
  1. Limit the JVM to AVX2. In this case, the JVM won’t generate AVX-512 code at all (including Base64 decoded), which has a broader performance impact. On ARM64, it prevents startup unless -XX:+IgnoreUnrecognizedVMOptions is also set:
 -XX:UseAVX=2

Neither option comes from Oracle or the OpenJDK project: The researchers who disclosed the issue identified them, and security vendors (Datadog and VulnCheck) have verified them.

To apply the chosen option (shown below as <option>):

  • Server: Append it to the TEAMCITY_SERVER_OPTS environment variable.
  • Agent started by agent.sh or agent.bat: Append it to both TEAMCITY_AGENT_OPTS (the agent process) and TEAMCITY_LAUNCHER_OPTS (the launcher process).
  • Agent running as a Windows service: In <agent home>/launcher/conf/wrapper.conf:
    • Add wrapper.app.parameter.<N>=<option> before the jetbrains.buildServer.agent.AgentMain line.
    • Add wrapper.java.additional.<N>=<option>.
    • Renumber the lines that follow each insertion.
  • Docker: Append it to the environment variables in the server (TEAMCITY_SERVER_OPTS) or agent (TEAMCITY_AGENT_OPTS) containers.

Restart each component and recreate Docker containers. A running JVM keeps the options it was started with. Remove the option once the runtime is updated.

Verify

Ensure that each TeamCity component is running on the updated JDK version or, if you’re using an interim workaround, has been started with the required JVM option.

You can verify this in the server or agent startup logs. For example:

... 
Java: 21.0.13.1, OpenJDK 64-Bit Server VM (21.0.13.1+2-LTS, mixed mode, sharing), OpenJDK Runtime Environment (21.0.13.1+2-LTS), Amazon.com Inc.; JVM parameters: ...-XX:-UseBASE64Intrinsics
... 

Frequently asked questions

Is TeamCity affected?

TeamCity may use affected Java runtimes on x86-64 hosts. We strongly recommend updating affected Java runtimes on TeamCity servers and build agents, or applying an appropriate mitigation.

Do I need to upgrade TeamCity?

The fix is applied to the Java runtime, and upgrading TeamCity does not necessarily replace it. We will provide additional mitigation mechanisms with the upcoming TeamCity 2026.2.3 and 2026.1.7.

Are ARM CPUs affected?

The vulnerable code exists only in the x86-64 JVM. ARM64 hosts, including Apple silicon and AWS Graviton, are not affected.

Is every x86-64 CPU affected?

Only processors with AVX-512 VBMI support running specific Java versions are affected. Use the detection script to check whether this applies to a specific host.

Support

For any questions regarding this issue, please get in touch with the TeamCity Support team by submitting a ticket. To report a security issue in TeamCity, please follow our Coordinated Disclosure Policy.

References