<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Autonomous DevOps]]></title><description><![CDATA[Autonomous DevOps]]></description><link>https://beamreach.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 11:45:46 GMT</lastBuildDate><atom:link href="https://beamreach.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Java2Shell (CVE-2026-114938): what is confirmed, what is not, and what to do now]]></title><description><![CDATA[Java2Shell, also called Java4Shell, is CVE-2026-114938 in OpenJDK 17.0.6 and later. Status on 25 November 2026: confirmed and fixed, the builds per vendor,]]></description><link>https://beamreach.hashnode.dev/java2shell-cve-2026-114938-what-is-confirmed-what-is-not-and-what-to-do-now</link><guid isPermaLink="true">https://beamreach.hashnode.dev/java2shell-cve-2026-114938-what-is-confirmed-what-is-not-and-what-to-do-now</guid><category><![CDATA[Security]]></category><category><![CDATA[Java]]></category><category><![CDATA[Devops]]></category><category><![CDATA[AWS]]></category><dc:creator><![CDATA[Ilia Dubovskii]]></dc:creator><pubDate>Wed, 25 Nov 2026 10:19:21 GMT</pubDate><content:encoded><![CDATA[<p>Java2Shell (CVE-2026-114938, called Java4Shell in most advisories) is confirmed and fixed. Oracle and the OpenJDK project published it on 17 November 2026 as a memory-corruption bug in the HotSpot JVM, in Java 17 (from 17.0.6), 21, 25 and 27, and fixed builds exist from every large JDK vendor. On 25 November 2026 the open questions are different ones: how hard remote code execution really is, whether anyone has been compromised, and whether your running JVMs have the fix.</p>
<p><em>Last checked: 25 November 2026. Written by Ilia Dubovskii, founder of Beamreach. Our <a href="https://beamreach.ai/docs/java2shell.html">first Java2Shell page</a> described 17 November, when the CVE was reported but not confirmed. This article is the update.</em></p>
<p><strong>The short version</strong></p>
<ul>
<li>CVE-2026-114938 is confirmed by Oracle and OpenJDK. The fixed OpenJDK versions are 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1. Standard Java 8 and 11 builds are not affected.</li>
<li>A JVM is exposed only when three things are true: an affected build, an x86-64 CPU with AVX-512 VBMI, and Base64 input from outside reaching the JDK's decoder. Arm64, including AWS Graviton, is not affected.</li>
<li>Scanning is real, compromise is not confirmed. On 25 November GreyNoise counted 261 trigger-shaped requests from 7 addresses and 0 successful intrusions on its sensors. CVE-2026-114938 is not in CISA's Known Exploited Vulnerabilities catalogue.</li>
<li>Sources disagree on severity: Oracle scores 8.1, Amazon Linux 8.8, Red Hat 9.8, and the finder 9.2 on a different scale. Crashing a JVM is easy. Code execution needs an exploit built for each application.</li>
<li>If you can't deploy a fixed JDK today, start the JVM with <code>-XX:-UseBASE64Intrinsics</code>. It needs a restart, the same as the fix.</li>
<li>A honeytoken in the workload's environment covers the time until the fix is running. It doesn't stop the exploit and it doesn't see a crash.</li>
</ul>
<h2>What changed since 17 November</h2>
<p>On 17 November 2026 our page said: reported, not confirmed, no fixed build confirmed. All three are out of date.</p>
<ul>
<li><strong>Confirmed.</strong> Oracle's <a href="https://www.oracle.com/security-alerts/cspunov2026.html">Critical Security Patch Update for November 2026</a> lists CVE-2026-114938 in the Java SE risk matrix, component "Compiler", CVSS 3.1 score 8.1. The <a href="https://openjdk.org/groups/vulnerability/advisories/2026-11-17">OpenJDK vulnerability advisory of 17 November 2026</a> lists the same CVE under <code>hotspot/compiler</code> and marks Java 17, 21, 25 and 27 as affected, and Java 8 and 11 as not affected.</li>
<li><strong>Fixed.</strong> Oracle released the fix at 1:00 pm Pacific time on 17 November, according to <a href="https://calif.io/java4shell">Calif's write-up</a>. Amazon Corretto shipped the same day. Eclipse Temurin and Red Hat followed on 18 and 19 November.</li>
<li><strong>Root cause published.</strong> Calif, the firm that reported the bug, published the cause the same day: the AVX-512 version of the <code>java.util.Base64</code> decoder computes a negative length when the input ends in padding and writes 62 bytes past the end of a buffer. The public trigger is 64 letters <code>A</code> followed by <code>=</code> (128 letters on Java 17). Calif published a reproducer that shows the overwrite. Calif says it is holding back its exploit chains for specific applications until users have had time to upgrade.</li>
<li><strong>Credit and history.</strong> Oracle credits Albert Yang and Quang Luong of Calif.io. Calif's timeline says the crash was first reported publicly in an Adoptium support issue on 9 June 2026, a fix was proposed in OpenJDK on 9 September and closed without merging, and Calif reported it to Oracle with a working exploit on 24 October.</li>
<li><strong>CISA alert.</strong> CISA published <a href="https://www.cisa.gov/news-events/alerts/2026/11/17/critical-java-vulnerability-requires-immediate-patching">an alert on 17 November 2026</a> that urges immediate patching. The alert does not say the bug is being exploited.</li>
</ul>
<p>The two names still mean one CVE. Vendors and CISA write "Java4Shell". We keep "Java2Shell" because it sits in the same family as React2Shell and PHP2Shell on our <a href="https://beamreach.ai/docs/2shell-vulnerabilities.html">*2Shell vulnerabilities page</a>.</p>
<h2>What is confirmed, and what is not</h2>
<table>
<thead>
<tr>
<th>Claim</th>
<th>Status on 25 November 2026</th>
<th>Source</th>
</tr>
</thead>
<tbody><tr>
<td>CVE-2026-114938 is a real bug in the JDK</td>
<td>Confirmed</td>
<td><a href="https://www.oracle.com/security-alerts/cspunov2026.html">Oracle</a>, <a href="https://openjdk.org/groups/vulnerability/advisories/2026-11-17">OpenJDK</a>, <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-114938">NVD</a></td>
</tr>
<tr>
<td>Affects Java 17 from 17.0.6, and 21, 25, 27</td>
<td>Confirmed. OpenJDK marks 17, 21, 25, 27. Red Hat states the code arrived in 17.0.6</td>
<td><a href="https://openjdk.org/groups/vulnerability/advisories/2026-11-17">OpenJDK</a>, <a href="https://access.redhat.com/security/cve/cve-2026-114938">Red Hat</a></td>
</tr>
<tr>
<td>Only x86-64 CPUs with AVX-512 VBMI</td>
<td>Confirmed by Red Hat, AWS, Eclipse Temurin and Jenkins. Oracle's advisory doesn't mention the CPU</td>
<td><a href="https://access.redhat.com/security/vulnerabilities/RHSB-2026-018">Red Hat bulletin</a>, <a href="https://aws.amazon.com/security/security-bulletins/2026-189-aws/">AWS</a></td>
</tr>
<tr>
<td>Remote code execution without login</td>
<td>Demonstrated by Calif against Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate in default configurations. Red Hat and Keycloak repeat the claim. The exploit chains are not public</td>
<td><a href="https://calif.io/java4shell">Calif</a>, <a href="https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938">Keycloak</a></td>
</tr>
<tr>
<td>Fixed builds exist</td>
<td>Confirmed for Oracle, Corretto, Temurin, Red Hat, Microsoft, Azul, Debian and Ubuntu</td>
<td>See the table of fixed builds below</td>
</tr>
<tr>
<td>Exploited in the wild</td>
<td>Scanning and blind attempts are reported. No confirmed compromise</td>
<td><a href="https://java4shell.events.greynoise.io/">GreyNoise</a>, <a href="https://www.securityweek.com/java4shell-exploitation-attempts-begin-as-vendors-rush-out-advisories/">SecurityWeek</a></td>
</tr>
<tr>
<td>In CISA's KEV catalogue</td>
<td>No. Catalogue version 2026.11.24 has no entry for CVE-2026-114938</td>
<td><a href="https://www.cisa.gov/known-exploited-vulnerabilities-catalog">CISA KEV</a></td>
</tr>
</tbody></table>
<p>What nobody outside Calif and a few vendors can check yet is how reliable code execution is against a given product. <a href="https://www.vulncheck.com/blog/java4shell">VulnCheck's analysis</a> says that crashing an affected JVM is trivial, and that code execution needs heap grooming plus a separate memory leak for each target. VulnCheck doesn't expect the bug to be "easily or widely exploitable", and also says it has a full exploit that it gives to its customers.</p>
<h2>Where the sources disagree</h2>
<p><strong>The score.</strong> Four numbers are in circulation for CVE-2026-114938, and they come from different assumptions.</p>
<table>
<thead>
<tr>
<th>Who</th>
<th>Score</th>
<th>What it assumes</th>
</tr>
</thead>
<tbody><tr>
<td>Oracle and OpenJDK</td>
<td>8.1, CVSS 3.1</td>
<td>No login needed, attack complexity high</td>
</tr>
<tr>
<td>Amazon Linux</td>
<td>8.8, CVSS 3.1, "Important"</td>
<td>Code execution needs a logged-in low-privilege user; without login the result is a crash</td>
</tr>
<tr>
<td>Red Hat</td>
<td>9.8, "Critical"</td>
<td>No login needed, attack complexity low</td>
</tr>
<tr>
<td>Calif</td>
<td>9.2, CVSS 4.0</td>
<td>The finder's own score, on a different scale</td>
</tr>
</tbody></table>
<p>Sources: <a href="https://www.oracle.com/security-alerts/cspunov2026.html">Oracle</a>, <a href="https://explore.alas.aws.amazon.com/CVE-2026-114938.html">Amazon Linux</a>, <a href="https://access.redhat.com/security/cve/cve-2026-114938">Red Hat</a>, <a href="https://research.jfrog.com/post/java4shell-vulnerability/">JFrog</a> for Calif's score. Amazon Linux and Red Hat describe the same bug and disagree on whether an attacker needs an account. Plan for the worse reading.</p>
<p><strong>Java 8 and 11.</strong> Standard OpenJDK 8 and 11 builds are not affected. Two commercial products are exceptions: Oracle lists the Java SE 8 Enterprise Performance Pack (<code>8u511b33-perf</code>) as affected, and <a href="https://www.azul.com/blog/java4shell-cve-2026-114938-what-it-is-who-is-affected-and-what-to-do-now/">Azul says</a> Azul Prime for Java 8 and 11 is affected. If you run either, "we're on Java 8" isn't an answer.</p>
<p><strong>Exploitation.</strong> <a href="https://java4shell.events.greynoise.io/">GreyNoise</a>, last updated 25 November 2026 at 09:48 UTC, shows 7 addresses that sent 261 requests with the trigger shape in an <code>Authorization</code> header, and 0 successful intrusions against its sensors. <a href="https://www.securityweek.com/java4shell-exploitation-attempts-begin-as-vendors-rush-out-advisories/">SecurityWeek</a> reported on 19 November that watchTowr saw requests with a <code>java4shell-recon</code> user agent and blind exploitation attempts, and that Previdian logged nine attempts and couldn't tell whether any target was compromised. <a href="https://aws.amazon.com/security/security-bulletins/2026-189-aws/">AWS</a> says it has no evidence that the issue has been used. So the honest status is: attempts yes, confirmed compromise no. A sensor that isn't a real Jira or Keycloak can't be compromised by an exploit written for Jira or Keycloak, so "0 intrusions" says little about real targets.</p>
<h2>Fixed builds by distribution</h2>
<p>The fix is a new JDK build. Nothing in your <code>pom.xml</code> or <code>build.gradle</code> changes.</p>
<table>
<thead>
<tr>
<th>Distribution</th>
<th>Fixed build</th>
<th>Source</th>
</tr>
</thead>
<tbody><tr>
<td>OpenJDK, upstream</td>
<td>17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1</td>
<td><a href="https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell">Eclipse Temurin</a></td>
</tr>
<tr>
<td>Oracle Java SE and GraalVM for JDK</td>
<td>17.0.21.1, 21.0.13.1, 25.0.5.1, 27.0.1.1; <code>8u513-perf</code> for the Enterprise Performance Pack. GraalVM Enterprise Edition 21.3: no fix listed</td>
<td><a href="https://watchtowr.com/intelligence/java4shell-cve-2026-114938-faq/">watchTowr</a>, reading Oracle's advisory</td>
</tr>
<tr>
<td>Eclipse Temurin</td>
<td><code>jdk-17.0.21.1+2</code>, <code>jdk-21.0.13.1+2</code>, <code>jdk-25.0.5.1+2</code>, <code>jdk-27.0.1.1+4</code>, published 18 November. Docker tags such as <code>17.0.21.1_2-jre-noble</code> exist. Some platforms were still in progress</td>
<td><a href="https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell">Temurin</a>, <a href="https://github.com/adoptium/temurin/issues/326">status issue</a></td>
</tr>
<tr>
<td>Amazon Corretto</td>
<td>17.0.21.1.2, 21.0.13.1.2, 25.0.5.1.2, 27.0.1.1.4, published 17 November</td>
<td><a href="https://aws.amazon.com/security/security-bulletins/2026-189-aws/">AWS bulletin 2026-189</a></td>
</tr>
<tr>
<td>Amazon Linux</td>
<td>ALAS2-2026-4123 (AL2, Corretto 17); ALAS2023-2026-3478 to 3481 (AL2023, Corretto 17, 21, 25, 27). Corretto 22, 23, 24 and 26: no fix planned</td>
<td><a href="https://explore.alas.aws.amazon.com/CVE-2026-114938.html">Amazon Linux</a></td>
</tr>
<tr>
<td>Red Hat</td>
<td>Red Hat build of OpenJDK 17.0.21.1, 21.0.13.1, 25.0.5.1 on 18 November; RHEL 8, 9 and 10 packages on 19 November (RHSA-2026:100563 to 100572)</td>
<td><a href="https://access.redhat.com/security/cve/cve-2026-114938">Red Hat CVE page</a></td>
</tr>
<tr>
<td>Microsoft Build of OpenJDK</td>
<td>17.0.21.1, 21.0.13.1, 25.0.5.1</td>
<td><a href="https://learn.microsoft.com/en-us/java/openjdk/release-notes">Microsoft release notes</a></td>
</tr>
<tr>
<td>Azul</td>
<td>The November 2026 builds of Azul Core; Azul Prime 26.08.110.0 and 26.02.510.0</td>
<td><a href="https://www.azul.com/blog/java4shell-cve-2026-114938-what-it-is-who-is-affected-and-what-to-do-now/">Azul</a></td>
</tr>
<tr>
<td>Debian</td>
<td><code>openjdk-17</code> 17.0.21.1+2-1<del>deb12u1 (bookworm); <code>openjdk-21</code> 21.0.13.1+2-1</del>deb13u1 and <code>openjdk-25</code> 25.0.5.1+2-1~deb13u1 (trixie). Testing was still vulnerable</td>
<td><a href="https://security-tracker.debian.org/tracker/CVE-2026-114938">Debian tracker</a></td>
</tr>
<tr>
<td>Ubuntu</td>
<td><code>openjdk-17</code> 17.0.21.1+2, <code>openjdk-21</code> 21.0.13.1+2 and <code>openjdk-25</code> 25.0.5.1+2 on 22.04 and 24.04</td>
<td><a href="https://ubuntu.com/security/CVE-2026-114938">Ubuntu</a></td>
</tr>
</tbody></table>
<p>Java 18, 19, 20, 22, 23, 24 and 26 get no fix. <a href="https://research.jfrog.com/post/java4shell-vulnerability/">JFrog</a> says to move to a supported line.</p>
<p>Products that bundle a JDK publish their own updates. Keycloak <a href="https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938">updated its 26.8 container images</a> to OpenJDK 21.0.13.1; the tags <code>26.8.2-1</code> and <code>26.8.2-2</code> carry an affected build. <a href="https://www.jenkins.io/blog/2026/11/18/mitigating-java4shell/">Jenkins</a> tells administrators to update Java under the controller. SecurityWeek lists Elastic, Atlassian, Cisco and Siemens advisories; read your vendor's page for the product you run.</p>
<h2>How to check if you are affected</h2>
<p>A JVM is exposed to CVE-2026-114938 when all three answers are yes. Check them in this order, because the first two take minutes.</p>
<p><strong>1. Is the Java version affected?</strong> Affected: 17.0.6 up to 17.0.21.0.x, 21 below 21.0.13.1, 25 below 25.0.5.1, 27 below 27.0.1.1, and every release of 18 to 20, 22 to 24 and 26. The fixed builds have a <code>.1</code> in the fourth position.</p>
<pre><code class="language-bash"># on a host
java -version

# in a running container or pod
docker exec &lt;container&gt; java -version
kubectl exec &lt;pod&gt; -- java -version

# in an image, without starting the application
docker run --rm --entrypoint java &lt;image&gt; -version

# the version a running process really uses (it may differ from the java on the path)
jcmd &lt;pid&gt; VM.version
</code></pre>
<p>JDKs that aren't on the path, such as the one bundled inside Elasticsearch, Jenkins or a vendor appliance, need a search. Every JDK and JRE ships a <code>release</code> file with a <code>JAVA_VERSION</code> line:</p>
<pre><code class="language-bash">find / -type f -name release -exec grep -H '^JAVA_VERSION=' {} + 2&gt;/dev/null
</code></pre>
<p><strong>2. Does the CPU have AVX-512 VBMI?</strong> Run this on the host or inside the container. If it prints <code>avx512vbmi</code>, the CPU has the instruction.</p>
<pre><code class="language-bash">grep -o -w -m1 'avx512vbmi' /proc/cpuinfo
</code></pre>
<p>Red Hat's bulletin lists four flags that must all be present: <code>avx512f</code>, <code>avx512bw</code>, <code>avx512vbmi</code> and <code>bmi2</code>. Intel Ice Lake and later and AMD Zen 4 and later have them. AWS names the EC2 families C6i, M6i, R6i, C7i, M7i, R7i, C7a, M7a and R7a. The same image can be exposed on one node and safe on another, so check where the workload runs, not where it was built.</p>
<p><strong>3. Where does the JDK come from in your code?</strong> This is where the fix will be made. Search the Dockerfiles, then look at the ECS task definitions and their CPU architecture. An empty architecture means x86-64.</p>
<pre><code class="language-bash">grep -rnEi --include='Dockerfile*' \
  'temurin|corretto|openjdk|zulu|liberica|sapmachine|graalvm|tomcat|jetty|maven|gradle|keycloak|jenkins' .

aws ecs describe-task-definition --task-definition &lt;name&gt; \
  --query "taskDefinition.[runtimePlatform.cpuArchitecture,containerDefinitions[].image]"
</code></pre>
<p>Base images are often one level down. If your <code>FROM</code> line names an internal image, run the <code>docker run</code> command above against that image.</p>
<p><strong>Lambda.</strong> AWS says Lambda functions on the default execution environment are not affected, because that environment doesn't support AVX-512 VBMI. Functions on Lambda Managed Instances may be affected, depending on the instance type. Functions deployed as container images have no runtime in the first list below; rebuild those from the patched base image. For ZIP functions, AWS has updated the managed Java runtimes for functions in Auto mode.</p>
<pre><code class="language-bash"># Java functions, their runtime and architecture
aws lambda list-functions --output table \
  --query "Functions[?contains(Runtime || '', 'java')].[FunctionName,Runtime,Architectures[0]]"

# functions deployed as container images
aws lambda list-functions --query "Functions[?PackageType=='Image'].FunctionName"

# runtime update mode of one function
aws lambda get-runtime-management-config --function-name &lt;name&gt;
</code></pre>
<p><strong>Fargate.</strong> You don't choose the CPU on AWS Fargate. AWS says customers running Java on Fargate x86-64 are responsible for updating the JDK, and that Fargate tasks on Graviton are not affected. Treat an x86-64 Fargate task with an affected JDK as exposed.</p>
<h2>What to do now</h2>
<p>In order of urgency.</p>
<ol>
<li><strong>Today: find internet-facing JVMs on affected builds and affected CPUs.</strong> Login services first. Calif's list of pre-auth targets is Keycloak, Jira, Confluence, Artifactory, Jenkins and PingFederate, and the requests GreyNoise records carry the trigger in an <code>Authorization</code> header, which a service decodes before it knows who you are.</li>
<li><strong>Today, where you can't deploy a fixed JDK yet: turn the decoder off.</strong> Start the JVM with <code>-XX:-UseBASE64Intrinsics</code>. Red Hat, AWS, Temurin and Jenkins all give this flag as the interim mitigation. It disables only the accelerated Base64 path. In a container the simplest place is the environment variable <code>JAVA_TOOL_OPTIONS=-XX:-UseBASE64Intrinsics</code>, followed by a restart. The alternative <code>-XX:UseAVX=2</code> turns off all AVX-512 use; Red Hat warns that an Arm64 JVM won't start with it. Both flags can cost performance.</li>
<li><strong>Verify the flag in the running process.</strong> <code>jcmd &lt;pid&gt; VM.flags -all | grep UseBASE64Intrinsics</code> should show <code>false</code>. An environment variable that was set after the process started changes nothing.</li>
<li><strong>This week: deploy the fixed build.</strong> Change the base image tag or the package version, rebuild, redeploy, and restart every JVM. A patched JDK on disk doesn't change a JVM that is already running. Then run <code>java -version</code> in the running container again.</li>
<li><strong>This week: update the products that bundle a JDK.</strong> Keycloak, Jenkins, Elasticsearch, Atlassian Data Center products and appliances ship their own Java. Your base image fix doesn't reach them.</li>
<li><strong>Until all of that is done: reduce what can reach the service.</strong> CISA's alert suggests limiting unauthenticated access and enforcing input-size limits where patching has to wait. An admin interface that only your VPN can reach is a much smaller target.</li>
<li><strong>Watch for crashes.</strong> A failed attempt can look like a JVM crash: an <code>hs_err_pid</code> file, a restart loop, a service that falls over under a burst of requests. VulnCheck found that one request usually didn't crash a default server and a burst did. CISA lists unexpected JVM crashes among the things to monitor. Until the fix is in, treat a crash of an internet-facing JVM as a possible attempt.</li>
<li><strong>Remove the flag after the fix is verified,</strong> so you get the Base64 performance back.</li>
</ol>
<h2>The window before your fix is running: a honeytoken</h2>
<p>Steps 4 and 5 take days in most fleets, and longer for appliances. A honeytoken is the cheapest cover we know for that window. It is a decoy credential that nothing legitimate uses, placed where an attacker looks first.</p>
<p>Whatever the exploit chain for a given Java application turns out to be, code execution in a JVM leads to the same next step as in every other *2Shell bug: read the environment variables and config files for credentials, then try them. So the setup doesn't depend on the bug:</p>
<ol>
<li>Put a decoy AWS access key in the environment of each Java workload, next to the real variables. The application never reads it.</li>
<li>Use one decoy per workload, so the key ID tells you which workload was entered.</li>
<li>Match any CloudTrail event from that key with an EventBridge rule and send it to the channel people watch.</li>
<li>Attach one response that can be undone: restart the task from its image, or deactivate the key.</li>
</ol>
<p>The Terraform for this is in <a href="https://beamreach.ai/docs/aws-canary-credentials.html">AWS canary credentials with Terraform</a>.</p>
<p>This is how our own two incidents differed. React2Shell in December 2025 took us four days to contain, with CPU, traffic and cost alerts firing and being explained away. PHP2Shell in October 2026 got code execution in one of our PHP containers on AWS Fargate; the attacker read the environment and tried the decoy key, the alert was in Slack in under a minute, the task was restarted within another minute, and nothing was harmed. We haven't been hit through Java2Shell, so we have no numbers for it.</p>
<p><strong>What a honeytoken does not do for Java2Shell.</strong> It doesn't stop the exploit request. It doesn't see an attacker who only crashes the JVM, and crashing is the easy outcome of this bug. It doesn't see an attacker who never uses the decoy. A restart ends one session; if the JDK is still unpatched and the flag isn't set, the attacker can come back. Keep your other alerts and GuardDuty. The honeytoken tells you that something is an attack; the other signals tell you what happened.</p>
<h3>Where Compass fits, and where it doesn't</h3>
<p><a href="https://github.com/beamreach-ai/compass">Compass</a> is our open-source (Apache 2.0) operations agent for AWS. For Java2Shell its help is limited, and the limit matters:</p>
<ul>
<li><strong>Honeytokens: yes.</strong> Compass plants decoy AWS keys and database logins as Terraform pull requests and can restart the ECS task or deactivate the key when one is used. That part doesn't care which runtime the workload uses. <a href="https://github.com/beamreach-ai/compass/blob/main/docs/honeytokens.md">Docs</a>.</li>
<li><strong>Inventory: partly.</strong> Compass's map records the image each ECS task definition runs and the base images in your Dockerfiles, with internet exposure. It doesn't know which CPU a task lands on.</li>
<li><strong>Patch pull requests: no.</strong> Java is NOT on the default product list of Compass's patch captain. That list covers PHP, Node, Python, nginx and others, see the <a href="https://github.com/beamreach-ai/compass/blob/main/docs/patching.md">patching docs</a>. Compass won't open the JDK upgrade pull request for CVE-2026-114938 by default. Plan on your own upgrade process.</li>
</ul>
<h2>FAQ</h2>
<p><strong>Is Java2Shell the same as Java4Shell?</strong>
Yes. Both names mean CVE-2026-114938. Oracle uses neither name. CISA, Red Hat, AWS and most security vendors write "Java4Shell".</p>
<p><strong>Which Java versions are affected by CVE-2026-114938?</strong>
OpenJDK 17 from 17.0.6, and 21, 25 and 27 before the fixed builds 17.0.21.1, 21.0.13.1, 25.0.5.1 and 27.0.1.1, on x86-64 CPUs with AVX-512 VBMI. The unsupported lines 18 to 20, 22 to 24 and 26 are affected and get no fix. Standard Java 8 and 11 builds are not affected; Oracle's Java 8 Enterprise Performance Pack and Azul Prime 8 and 11 are.</p>
<p><strong>Is Java2Shell being exploited?</strong>
Scanning and blind exploitation attempts have been reported since 18 November 2026. On 25 November 2026 no source we could open confirmed a successful compromise, and CVE-2026-114938 was not in CISA's Known Exploited Vulnerabilities catalogue. A public reproducer for the memory corruption exists; the exploit chains for specific products have not been published.</p>
<p><strong>Is there a workaround for Java2Shell?</strong>
Yes. Start the JVM with <code>-XX:-UseBASE64Intrinsics</code> and restart it. Red Hat, AWS, Eclipse Temurin and Jenkins all list this flag as the interim mitigation until the fixed JDK is deployed. Check the running process with <code>jcmd</code>, not the environment variable.</p>
<p><strong>Are AWS Lambda and Graviton affected?</strong>
AWS says Java workloads on Graviton are not affected, and that Lambda functions on the default execution environment are not affected because it lacks AVX-512 VBMI. Lambda Managed Instances, EC2, ECS and Fargate on x86-64 can be affected, and the JDK update there is the customer's job.</p>
<h2>Sources</h2>
<ul>
<li>Oracle: <a href="https://www.oracle.com/security-alerts/cspunov2026.html">Critical Security Patch Update Advisory, November 2026</a></li>
<li>OpenJDK: <a href="https://openjdk.org/groups/vulnerability/advisories/2026-11-17">vulnerability advisory, 17 November 2026</a></li>
<li>NVD: <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-114938">CVE-2026-114938</a>; GitHub: <a href="https://github.com/advisories/GHSA-6g7j-4xh3-xq2q">GHSA-6g7j-4xh3-xq2q</a></li>
<li>CISA: <a href="https://www.cisa.gov/news-events/alerts/2026/11/17/critical-java-vulnerability-requires-immediate-patching">alert of 17 November 2026</a>, <a href="https://www.cisa.gov/known-exploited-vulnerabilities-catalog">Known Exploited Vulnerabilities catalogue</a></li>
<li>Calif: <a href="https://calif.io/java4shell">Java4Shell write-up and timeline</a></li>
<li>Red Hat: <a href="https://access.redhat.com/security/cve/cve-2026-114938">CVE page with errata</a>, <a href="https://access.redhat.com/security/vulnerabilities/RHSB-2026-018">security bulletin RHSB-2026-018</a></li>
<li>AWS: <a href="https://aws.amazon.com/security/security-bulletins/2026-189-aws/">security bulletin 2026-189</a>, <a href="https://explore.alas.aws.amazon.com/CVE-2026-114938.html">Amazon Linux Security Center</a></li>
<li>Eclipse Temurin: <a href="https://adoptium.net/news/2026/11/temurin-november-2026-cspu-java4shell">guidance for CVE-2026-114938</a>, <a href="https://github.com/adoptium/temurin/issues/326">release status issue</a></li>
<li>Azul: <a href="https://www.azul.com/blog/java4shell-cve-2026-114938-what-it-is-who-is-affected-and-what-to-do-now/">Java4Shell, who is affected</a>; Microsoft: <a href="https://learn.microsoft.com/en-us/java/openjdk/release-notes">OpenJDK release notes</a></li>
<li>Debian: <a href="https://security-tracker.debian.org/tracker/CVE-2026-114938">security tracker</a>; Ubuntu: <a href="https://ubuntu.com/security/CVE-2026-114938">CVE page</a></li>
<li>Keycloak: <a href="https://www.keycloak.org/2026/11/java4shell-vulnerability-cve-2026-114938">Java4Shell and Keycloak</a>; Jenkins: <a href="https://www.jenkins.io/blog/2026/11/18/mitigating-java4shell/">mitigating Java4Shell</a></li>
<li>GreyNoise: <a href="https://java4shell.events.greynoise.io/">Java4Shell activity</a>; SecurityWeek: <a href="https://www.securityweek.com/java4shell-exploitation-attempts-begin-as-vendors-rush-out-advisories/">exploitation attempts begin</a></li>
<li>Analysis: <a href="https://www.vulncheck.com/blog/java4shell">VulnCheck</a>, <a href="https://research.jfrog.com/post/java4shell-vulnerability/">JFrog</a>, <a href="https://watchtowr.com/intelligence/java4shell-cve-2026-114938-faq/">watchTowr</a></li>
<li>Beamreach: <a href="https://beamreach.ai/docs/java2shell.html">Java2Shell, the 17 November page</a>, <a href="https://beamreach.ai/docs/2shell-vulnerabilities.html">the *2Shell vulnerabilities</a>, <a href="https://beamreach.ai/docs/aws-canary-credentials.html">AWS canary credentials with Terraform</a></li>
</ul>
<hr />
<p><em>This article was first published on <a href="https://beamreach.ai/docs/java2shell-what-to-do.html">beamreach.ai</a>. It was drafted with AI assistance and reviewed by the author.</em></p>
<p><em>New critical and exploited vulnerabilities, one page each with checks and fixes: <a href="https://beamreach.ai/docs/cve-watch.html">CVE Watch</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Automated Vulnerability Patching Compared: Dependabot, Renovate, Inspector, Copacetic, AI Fixers and Compass]]></title><description><![CDATA[What each kind of patching tool actually does when a runtime bug like PHP2Shell lands: what it can change, how it decides what's urgent, and how it checks]]></description><link>https://beamreach.hashnode.dev/automated-vulnerability-patching-compared-dependabot-renovate-inspector-copacetic-ai-fixers-and-comp</link><guid isPermaLink="true">https://beamreach.hashnode.dev/automated-vulnerability-patching-compared-dependabot-renovate-inspector-copacetic-ai-fixers-and-comp</guid><category><![CDATA[Security]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Docker]]></category><category><![CDATA[AWS]]></category><dc:creator><![CDATA[Ilia Dubovskii]]></dc:creator><pubDate>Wed, 25 Nov 2026 09:41:14 GMT</pubDate><content:encoded><![CDATA[<p>Automated patching tools fall into five groups: dependency bump bots (Dependabot, Renovate), scanners that find but don't fix (Amazon Inspector, Trivy, Grype), in-place image patchers (Copacetic), AI code fixers (Copilot Autofix, CodeMender, Snyk and Aikido autofix), and infrastructure-aware patch agents (Compass). They answer different questions. When a runtime vulnerability such as PHP2Shell (CVE-2026-109618) lands, the differences that matter are what the tool is able to change, how it decides what is urgent, and how it proves the running workload is fixed.</p>
<p><em>Last checked: 24 November 2026. Written by Ilia Dubovskii, founder of Beamreach; Compass is our open-source project, and its limits are listed below with everyone else's.</em></p>
<p><strong>The short version</strong></p>
<ul>
<li>Bump bots edit manifests and lockfiles. PHP2Shell was fixed by changing a base image tag or an OS package, which is outside what Dependabot's security updates cover.</li>
<li>Scanners tell you an image is vulnerable. Someone still has to find the Dockerfile and open the pull request.</li>
<li>No tool in this list should merge a security fix into production alone. The good ones stop at a verified pull request.</li>
<li>"Verified" has to mean more than green CI: the image builds, a staging copy behaves the same, and a later scan sees the fixed version running.</li>
<li>Ask five questions of your setup (end of this article). Most teams fail question 4.</li>
</ul>
<h2>The worked example: PHP2Shell</h2>
<p>PHP2Shell is two memory-safety bugs in the PHP interpreter itself. Fixed releases (8.5.12, 8.4.27, 8.3.36, 8.2.35) shipped on 21 October 2026. For a containerised site the fix is one of:</p>
<ul>
<li><code>FROM php:8.3.30-fpm</code> becomes <code>FROM php:8.3.36-fpm</code></li>
<li>an <code>apt-get install php8.3-fpm</code> line gets the fixed distribution build</li>
<li>a Bref layer ARN on Lambda moves to its new version</li>
</ul>
<p>Then the image is rebuilt and every worker restarted. Nothing in <code>composer.json</code> changes. That's the test case for the table below.</p>
<h2>What each group does</h2>
<table>
<thead>
<tr>
<th>Group</th>
<th>Examples</th>
<th>Changes it can make</th>
<th>How it prioritises</th>
<th>How it verifies</th>
<th>PHP2Shell</th>
</tr>
</thead>
<tbody><tr>
<td>Dependency bump bots</td>
<td>Dependabot, Renovate</td>
<td>Versions in manifests and lockfiles; Docker tags as scheduled version updates</td>
<td>Advisory severity; schedule</td>
<td>The repository's CI</td>
<td>Not as a security update</td>
</tr>
<tr>
<td>Scanners</td>
<td>Amazon Inspector, Trivy, Grype</td>
<td>None</td>
<td>Severity; Inspector also shows which ECR images are in use</td>
<td>n/a</td>
<td>Finds it, fixes nothing</td>
</tr>
<tr>
<td>In-place image patchers</td>
<td>Copacetic</td>
<td>OS packages inside an existing image</td>
<td>Scanner report</td>
<td>Rescan</td>
<td>Only if PHP came from an OS package; the Dockerfile stays unfixed</td>
</tr>
<tr>
<td>AI code fixers</td>
<td>Copilot Autofix, CodeMender, Snyk and Aikido autofix</td>
<td>First-party code; some dependency upgrades</td>
<td>Code-scanning findings</td>
<td>Tests; the strongest add fuzzing or a sandboxed exploit</td>
<td>Not their target</td>
</tr>
<tr>
<td>Infrastructure-aware patch agents</td>
<td>Compass</td>
<td>Base image tags, OS package pins, Lambda layers, direct dependencies</td>
<td>Exploitation (KEV, EPSS), CVSS, internet exposure</td>
<td>CI, image build, staging canary</td>
<td>Yes, as a pull request</td>
</tr>
</tbody></table>
<h3>Dependency bump bots</h3>
<p>Dependabot and Renovate are the right tool for library versions. Their limits for this kind of bug:</p>
<ul>
<li><strong>Coverage.</strong> GitHub says Dependabot security updates are "triggered only for dependencies that are specified in a manifest or lock file", and its <a href="https://docs.github.com/en/code-security/dependabot/ecosystems-supported-by-dependabot/supported-ecosystems-and-repositories">supported ecosystems table</a> lists Docker under version updates but not security updates.</li>
<li><strong>Transitive dependencies.</strong> Per <a href="https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates">GitHub's documentation</a>, outside npm and some NuGet projects Dependabot "can't update an indirect or transitive dependency if doing so would also require updating the parent dependency".</li>
<li><strong>No view of production.</strong> A bump pull request is the same whether the code runs on the public login page or nowhere.</li>
</ul>
<p>Renovate is more configurable: security pull requests can skip schedules, and <a href="https://docs.renovatebot.com/key-concepts/automerge/">automerge</a> happens only after required checks pass. It still knows the repository, not the running workload.</p>
<h3>Scanners</h3>
<p><a href="https://docs.aws.amazon.com/inspector/latest/user/scanning-ecr.html">Amazon Inspector</a>, Trivy and Grype answer "which images contain the vulnerable version?". Inspector also reports how many running tasks use an ECR image, which is the start of prioritising. None of them opens the fix. The work between a finding and a merged change (which repository, which file, which line) is what takes the hours.</p>
<h3>In-place image patchers</h3>
<p><a href="https://project-copacetic.github.io/copacetic/website/">Copacetic</a> patches OS packages inside an existing container image without a rebuild. It's fast when you can't rebuild. The cost is drift: the Dockerfile still says the old version, so the next build brings the vulnerability back unless someone also fixes the source.</p>
<h3>AI code fixers</h3>
<p>Tools such as <a href="https://docs.github.com/en/code-security/code-scanning/managing-code-scanning-alerts/responsible-use-autofix-code-scanning">Copilot Autofix</a> and <a href="https://deepmind.google/blog/introducing-codemender-an-ai-agent-for-code-security/">CodeMender</a> write patches to your own code. That's a different problem from PHP2Shell, where your code is fine and the runtime is not. Where they matter for runtime bugs is the upgrade that isn't a plain bump: a major version, a breaking change, a transitive dependency. Someone has to read the changelog and the call sites and adjust the code. A model does that reading well and is sometimes wrong, so the output needs the same verification as any other change.</p>
<h3>Infrastructure-aware patch agents: Compass</h3>
<p><a href="https://github.com/beamreach-ai/compass">Compass</a> is our open-source (Apache 2.0) operations agent for AWS. Its patch feature starts from the running account instead of the repository:</p>
<ul>
<li><strong>Follows</strong> OSV, the CVE list, CISA KEV, EPSS, Packagist, npm and the Ubuntu, Debian, Alpine and Amazon Linux trackers every hour.</li>
<li><strong>Matches</strong> every fifteen minutes against what each workload is made of: container images in task definitions, Lambda runtimes and layers, what Dockerfiles install, what manifests and lockfiles pin.</li>
<li><strong>Decides</strong> from exploitation and exposure. A finding that is in KEV, has EPSS of 0.1 or more, CVSS of 7.0 or more, or sits on an internet-facing workload gets its pull request without a click. The rest become one inbox item per repository for a person to approve.</li>
<li><strong>Edits deterministically:</strong> a version string replaced by the one the advisory names. One pull request per repository.</li>
<li><strong>Verifies</strong> in three steps: the repository's CI; the image build where a Dockerfile changed; and, if you name a staging twin, a canary that deploys the pull request's image to staging, compares health checks, 5xx rate and p95 latency with the five minutes before, then rolls staging back.</li>
<li><strong>Never merges.</strong> After a merge, the next scan that sees the fixed version running marks the finding deployed.</li>
</ul>
<p>What it doesn't do today (<a href="https://github.com/beamreach-ai/compass/blob/main/docs/patching.md">docs</a>): bump a Lambda runtime or an AMI, move a transitive dependency, cross a major version, or write code changes. Those findings wait in the inbox with the reason stated. It's AWS-only, and Java isn't on its default product list.</p>
<h2>Five questions for any patching setup</h2>
<ol>
<li><strong>Can it change what was actually vulnerable?</strong> For PHP2Shell that's a <code>FROM</code> line, an apt pin or a layer ARN, not a manifest.</li>
<li><strong>Does it know what's exposed?</strong> Urgency should come from exploitation data and internet exposure, not from the order pull requests were opened.</li>
<li><strong>Does the fix arrive as a pull request without someone opening a ticket?</strong> On the day of a KEV listing, the queue is the delay.</li>
<li><strong>How does it know the fix worked?</strong> Green CI says the code compiles. It doesn't say the image builds, the service still answers, or the fixed binary is the one running.</li>
<li><strong>What happens when a plain bump isn't possible?</strong> There should be a stated reason and an owner, not silence.</li>
</ol>
<p>Patching closes the vulnerability but can't cover the days before a fix exists: PHP2Shell was exploited four days before the fixed releases. For that window see <a href="https://beamreach.ai/docs/protect-against-2shell-vulnerabilities.html">how to protect against *2Shell vulnerabilities</a>.</p>
<h2>FAQ</h2>
<p><strong>Does Dependabot fix PHP2Shell?</strong>
Not as a security update. PHP2Shell is in the PHP interpreter, and the fix is a base image tag, an OS package or a Lambda layer. GitHub's supported ecosystems table lists Docker under Dependabot version updates but not security updates.</p>
<p><strong>What is the difference between a vulnerability scanner and a patching tool?</strong>
A scanner such as Amazon Inspector, Trivy or Grype reports which images contain a vulnerable version. A patching tool changes the source (the Dockerfile, the manifest, the layer version) and opens a pull request.</p>
<p><strong>Should security patches be merged automatically?</strong>
For production, no tool in this comparison should merge alone. The safe pattern is a pull request opened automatically, verified by CI, an image build and a staging canary, and merged by a person.</p>
<p><strong>How do I verify that a patch actually worked?</strong>
Check four things: CI passes, the image builds, a staging copy behaves the same as before (health checks, error rate, latency), and a later scan sees the fixed version running in production.</p>
<h2>Sources</h2>
<ul>
<li>GitHub: <a href="https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates">about Dependabot security updates</a>, <a href="https://docs.github.com/en/code-security/dependabot/ecosystems-supported-by-dependabot/supported-ecosystems-and-repositories">supported ecosystems</a></li>
<li>Renovate: <a href="https://docs.renovatebot.com/key-concepts/automerge/">automerge</a></li>
<li>AWS: <a href="https://docs.aws.amazon.com/inspector/latest/user/scanning-ecr.html">Inspector ECR scanning</a></li>
<li><a href="https://project-copacetic.github.io/copacetic/website/">Copacetic</a></li>
<li><a href="https://docs.snyk.io/scan-with-snyk/pull-requests/snyk-fix-pull-or-merge-requests">Snyk fix pull requests</a>, <a href="https://docs.github.com/en/code-security/code-scanning/managing-code-scanning-alerts/responsible-use-autofix-code-scanning">Copilot Autofix</a>, <a href="https://deepmind.google/blog/introducing-codemender-an-ai-agent-for-code-security/">CodeMender</a></li>
<li>PHP: <a href="https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w">GHSA-w8hw-w9fx-j79w</a>, <a href="https://www.php.net/archive/2026.php">release announcements</a></li>
<li>Compass: <a href="https://github.com/beamreach-ai/compass/blob/main/docs/patching.md">patching documentation</a></li>
</ul>
<hr />
<p><em>This article was first published on <a href="https://beamreach.ai/docs/automated-vulnerability-patching-compared.html">beamreach.ai</a>. It was drafted with AI assistance and reviewed by the author.</em></p>
<p><em>New critical and exploited vulnerabilities, one page each with checks and fixes: <a href="https://beamreach.ai/docs/cve-watch.html">CVE Watch</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[PHP2Shell Hit Our PHP Sites. A Fake AWS Key Contained It in Under Two Minutes]]></title><description><![CDATA[An incident write-up: PHP2Shell (CVE-2026-109618) got code execution in one of our containers. A decoy AWS key in the environment tripped, and the containe]]></description><link>https://beamreach.hashnode.dev/php2shell-hit-our-php-sites-a-fake-aws-key-contained-it-in-under-two-minutes</link><guid isPermaLink="true">https://beamreach.hashnode.dev/php2shell-hit-our-php-sites-a-fake-aws-key-contained-it-in-under-two-minutes</guid><category><![CDATA[Security]]></category><category><![CDATA[PHP]]></category><category><![CDATA[AWS]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[Ilia Dubovskii]]></dc:creator><pubDate>Wed, 25 Nov 2026 09:41:09 GMT</pubDate><content:encoded><![CDATA[<p>In October 2026 an attacker used PHP2Shell (CVE-2026-109618 and CVE-2026-109619) to get code execution in one of our PHP containers on AWS Fargate. They read the environment variables, found an AWS access key and tried it. The key was a decoy. The alert reached Slack in under a minute, the container was replaced within another minute, and nothing was harmed. Ten months earlier a similar attack through React2Shell had gone unnoticed for a weekend and took four days to contain. This is what changed between the two.</p>
<p><em>Written by Ilia Dubovskii, founder of Beamreach. Details are anonymised and simplified. Last checked: 24 November 2026.</em></p>
<p><strong>The short version</strong></p>
<ul>
<li>React2Shell (December 2025): CPU, egress and cost alerts fired and were explained away. Containment took four days.</li>
<li>PHP2Shell (October 2026): a decoy AWS key in the container's environment was used by the attacker. Alert in under a minute, container replaced within another minute, zero harm.</li>
<li>The difference was one signal with no innocent explanation, and one automatic response that can be undone.</li>
<li>The restart didn't fix PHP. It ended the attacker's session; the patched image closed the vulnerability.</li>
</ul>
<h2>The first time: React2Shell, four days</h2>
<p>We were hit by React2Shell (CVE-2025-55182) on a Friday night in December 2025. The setup was ordinary: apps in containers, in a private network, behind a load balancer, with Dependabot pull requests waiting to be merged.</p>
<p>The attacker read the secrets from <code>.env</code>, used them to reach the database, and tried to export data.</p>
<p>Our alerts did fire. CPU at 95%. An outbound traffic spike. AWS Cost Anomaly emails. None of them said what was happening. The engineer on call had a plausible explanation, a database migration that week, acknowledged the alerts and went on with the weekend. Nobody looked again until Monday. Containment finished on Tuesday night.</p>
<p>The alerts worked. That was the uncomfortable part. They measured symptoms, and symptoms have innocent explanations.</p>
<h2>What we changed</h2>
<p>We didn't add more alerts. We added one signal that has no innocent explanation.</p>
<p>Every container got two extra environment variables next to the real ones: a decoy AWS access key and a decoy database login. The application never reads them. Nothing legitimate has a reason to use them. The AWS key belongs to an IAM user that is denied everything, so using it achieves nothing except a CloudTrail record.</p>
<p>Three details mattered:</p>
<ol>
<li><strong>One decoy per task definition.</strong> Each key is planted in exactly one place, so the key ID tells you which workload was compromised. No investigation needed to find the source.</li>
<li><strong>An EventBridge rule on the decoy.</strong> Any CloudTrail event from that key is delivered to the agent and to Slack.</li>
<li><strong>One response that can be undone.</strong> Restart the task. A clean container from the image replaces the compromised one. If the trip turns out to be a mistake, a restart costs a few seconds of capacity.</li>
</ol>
<h2>The second time: PHP2Shell, under two minutes</h2>
<p>PHP2Shell is a pair of memory-safety bugs in the PHP interpreter, reachable with one unauthenticated request. PHP shipped fixes on 21 October 2026. <a href="https://aws.amazon.com/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/">Amazon's MadPot honeypots had recorded exploitation</a> on 17 October, four days earlier. No patch process could have closed that window.</p>
<p>On our sites it went like this:</p>
<table>
<thead>
<tr>
<th>Step</th>
<th>What happened</th>
<th>Time</th>
</tr>
</thead>
<tbody><tr>
<td>1</td>
<td>The attacker gets code execution through PHP2Shell and reads the environment</td>
<td>0</td>
</tr>
<tr>
<td>2</td>
<td>The attacker tries the decoy AWS key. CloudTrail logs the call</td>
<td>seconds</td>
</tr>
<tr>
<td>3</td>
<td>EventBridge matches the decoy; the alert reaches Slack, naming the task</td>
<td>under 1 minute</td>
</tr>
<tr>
<td>4</td>
<td>The agent restarts that task; a clean container replaces it</td>
<td>about 1 more minute</td>
</tr>
</tbody></table>
<p>Under two minutes from the attacker's first move to containment. Zero harm.</p>
<p>Nobody was paged to make a decision. Nobody had to work out whether a CPU spike was a migration.</p>
<h2>Why it was safe to let software act alone</h2>
<p>I call the principle <em>automate on certainty</em>.</p>
<p>If one CPU alert in a thousand is an attack, an automatic kill switch on CPU alerts is wrong 999 times. So a human has to look, and at 11pm on a Friday the human has a plausible explanation.</p>
<p>A decoy key is different. No legitimate process uses it, so when it is used, the chance that it's an attack is close to one. And the response we automated, a restart, can be undone. A near-certain signal plus an undoable action is the case where a human adds delay and little else.</p>
<p>Everything else stays with people: the patch, the review of what the attacker reached, the decision to rotate real credentials.</p>
<h2>What the restart did not do</h2>
<p>It didn't fix PHP. The image was still vulnerable, and the same attacker could have come back through the same bug. The restart ended that session before it could become four days. Only the patched image closed the door.</p>
<p>A honeytoken also doesn't see an attacker who never touches a decoy. It's a tripwire on the most predictable move, the credential grab. We kept GuardDuty and every alert we had. When the honeytoken tripped, those alerts became the context around it: the honeytoken decided, the alerts explained.</p>
<h2>If you want to do the same</h2>
<ul>
<li>Build one by hand in Terraform: <a href="https://beamreach.ai/docs/aws-canary-credentials.html">AWS canary credentials: how to set up an IAM honeytoken</a>. The module is on GitHub: <a href="https://github.com/beamreach-ai/terraform-aws-honeytoken">terraform-aws-honeytoken</a>.</li>
<li>Or let <a href="https://github.com/beamreach-ai/compass">Compass</a> plant them. It's the open-source (Apache 2.0) agent in this story. It adds decoys as Terraform pull requests and has two undoable responses: restart an ECS task, deactivate an access key.</li>
<li>The PHP2Shell details, affected versions and fixes are on our <a href="https://beamreach.ai/docs/php2shell.html">PHP2Shell page</a>.</li>
<li>The talk this comes from: <a href="https://beamreach.ai/talks/one-fake-password.html">One Fake Password Is Worth More Than 10,000 Alerts</a>, DevOpsDays Barcelona, 14 November 2026.</li>
</ul>
<p>One fake password did more for us than every alert we had that weekend.</p>
<h2>FAQ</h2>
<p><strong>How was PHP2Shell detected so quickly?</strong>
By a honeytoken: a decoy AWS access key in the container's environment that the application never uses. The attacker read the environment after exploiting PHP2Shell and tried the key, CloudTrail logged the call, and an EventBridge rule sent the alert in under a minute.</p>
<p><strong>Why restart the container instead of paging someone?</strong>
A decoy key that nothing legitimate uses is a near-certain sign of an attacker, and a restart can be undone. With a near-certain signal and an undoable action, waiting for a person only adds delay.</p>
<p><strong>Does restarting the container fix PHP2Shell?</strong>
No. The restart replaces the compromised container with a clean one from the same image, which is still vulnerable. Only installing a fixed PHP release (8.5.12, 8.4.27, 8.3.36 or 8.2.35) and redeploying closes it.</p>
<p><strong>Would the alerts alone have caught it?</strong>
They fired during React2Shell ten months earlier and were dismissed as a database migration. Alerts measure symptoms such as CPU and egress, which usually have innocent causes. Keep them as context around the honeytoken.</p>
<hr />
<p><em>This article was first published on <a href="https://beamreach.ai/docs/php2shell-contained-in-two-minutes.html">beamreach.ai</a>. It was drafted with AI assistance and reviewed by the author.</em></p>
<p><em>New critical and exploited vulnerabilities, one page each with checks and fixes: <a href="https://beamreach.ai/docs/cve-watch.html">CVE Watch</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to Protect Against *2Shell Vulnerabilities: Honeytokens, WAF Blocks and Patches That Prove Themselves]]></title><description><![CDATA[React2Shell, PHP2Shell, Node2Shell, Java2Shell: four layers that work against pre-auth RCE in a runtime, what each one covers, and what it misses. Honeytok]]></description><link>https://beamreach.hashnode.dev/how-to-protect-against-2shell-vulnerabilities-honeytokens-waf-blocks-and-patches-that-prove-themselv</link><guid isPermaLink="true">https://beamreach.hashnode.dev/how-to-protect-against-2shell-vulnerabilities-honeytokens-waf-blocks-and-patches-that-prove-themselv</guid><category><![CDATA[Security]]></category><category><![CDATA[Devops]]></category><category><![CDATA[AWS]]></category><category><![CDATA[PHP]]></category><dc:creator><![CDATA[Ilia Dubovskii]]></dc:creator><pubDate>Wed, 25 Nov 2026 09:41:05 GMT</pubDate><content:encoded><![CDATA[<p>To protect against a *2Shell vulnerability (React2Shell, PHP2Shell, Node2Shell, Java2Shell and whichever comes next) you need four layers, because no single one covers the whole timeline: an inventory that answers "are we affected?" in minutes, a WAF that updates itself, a honeytoken in every workload that triggers an automatic and undoable response, and a patch path that opens the fix as a pull request and proves the fix works. This article explains each layer, what it stops, and what it doesn't.</p>
<p><em>Last checked: 25 November 2026. Written by Ilia Dubovskii, founder of Beamreach. We were hit by React2Shell in December 2025 and by PHP2Shell in October 2026; the numbers from those incidents are below.</em></p>
<p><strong>The short version</strong></p>
<ul>
<li>*2Shell bugs are unauthenticated remote code execution in a layer almost everyone runs: a framework default, the language interpreter, a compression library. You didn't choose the vulnerable component and you can't remove it.</li>
<li>Patching fast isn't enough. PHP2Shell was exploited on 17 October 2026, four days before the fixed PHP releases shipped on 21 October.</li>
<li>A WAF buys hours, sometimes. It's the only layer that can stop the exploit request itself, and the one attackers bypass most often.</li>
<li>A honeytoken (a decoy credential in the workload's environment) catches the attacker's first move after the exploit. It contained our PHP2Shell incident in under two minutes. React2Shell, without one, took four days.</li>
<li>A version-bump bot isn't a patch process. The fix for these bugs was usually a base image tag or an OS package, and "the pull request merged" isn't the same as "the running process is fixed".</li>
</ul>
<h2>What is a *2Shell vulnerability?</h2>
<p>A *2Shell vulnerability is a critical bug that takes an attacker from sending one request to running commands on your server, with no login. The name is shorthand for "from X to a shell". It started with Log4Shell in 2021 and became "2Shell" with React2Shell in December 2025.</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>CVE</th>
<th>Where the bug is</th>
<th>Disclosed</th>
</tr>
</thead>
<tbody><tr>
<td>React2Shell</td>
<td>CVE-2025-55182</td>
<td>React Server Components, Next.js App Router</td>
<td>3 Dec 2025</td>
</tr>
<tr>
<td>PHP2Shell</td>
<td>CVE-2026-109618, CVE-2026-109619</td>
<td>The PHP interpreter, every web SAPI</td>
<td>20–22 Oct 2026</td>
</tr>
<tr>
<td>Node2Shell / HTTP2Shell / Py2Shell</td>
<td>CVE-2026-111497</td>
<td>Google's Brotli decoder in Node.js, Python packages, Bun, .NET, Envoy</td>
<td>21–23 Oct 2026</td>
</tr>
<tr>
<td>Java2Shell / Java4Shell</td>
<td>CVE-2026-114938</td>
<td>The OpenJDK Base64 decoder, Java 17.0.6+ on x86-64 with AVX-512 VBMI; confirmed and fixed 17 Nov 2026</td>
<td>16–17 Nov 2026</td>
</tr>
</tbody></table>
<p>The full list with fixed versions and status is on our <a href="https://beamreach.ai/docs/2shell-vulnerabilities.html">*2Shell vulnerabilities page</a>.</p>
<p>What matters for defence is what they share:</p>
<ol>
<li><strong>No login needed.</strong> Anyone who can reach the service can try.</li>
<li><strong>Hidden copies.</strong> Next.js bundles its own React Server Components code. Node.js bundles Brotli. Appliances bundle PHP. "We upgraded the library" often isn't true of the running process.</li>
<li><strong>Exploitation within days, or before the patch.</strong> <a href="https://aws.amazon.com/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/">Amazon's MadPot honeypots recorded PHP2Shell exploitation</a> four days before the fix.</li>
<li><strong>A predictable next step.</strong> After the shell, attackers read environment variables and config files for credentials, then use them.</li>
</ol>
<p>Point 4 is the one defenders can use.</p>
<h2>The four layers, and what each one covers</h2>
<table>
<thead>
<tr>
<th>Layer</th>
<th>When it works</th>
<th>What it stops</th>
<th>What it misses</th>
</tr>
</thead>
<tbody><tr>
<td>Inventory</td>
<td>Before and on disclosure day</td>
<td>Guessing. Tells you which internet-facing workloads run the affected version</td>
<td>Stops nothing by itself</td>
</tr>
<tr>
<td>WAF, updated automatically</td>
<td>From the day a rule exists</td>
<td>The exploit request, if the rule matches</td>
<td>Bypasses; bugs that have no clean request pattern; traffic that doesn't cross the WAF</td>
</tr>
<tr>
<td>Honeytoken + automatic response</td>
<td>Any time, including before a patch exists</td>
<td>The attacker's session, minutes after the exploit succeeds</td>
<td>An attacker who never touches a decoy; the exploit itself</td>
</tr>
<tr>
<td>Patch pull request with verification</td>
<td>From the day a fix exists</td>
<td>The vulnerability</td>
<td>The window before the fix; anything nobody merges</td>
</tr>
</tbody></table>
<p>You need all four because the timeline has three different windows: before a fix exists, between the fix and your deployment, and after you believe you're patched.</p>
<h2>Layer 1: an inventory you can query</h2>
<p>On disclosure day the first question is "which of our internet-facing services run PHP 8.3 below 8.3.36?". If that takes a day of asking around, the other layers start a day late.</p>
<p>A useful inventory links three things: what each running workload is built from (the image of each container, the runtime of each function), where that is defined in code (the <code>FROM</code> line, the <code>apt-get install</code> line, the lockfile), and whether the workload faces the internet. Scanners give you the first. The link to the repository and file is what turns a finding into a fix someone can merge.</p>
<h2>Layer 2: a WAF that updates itself</h2>
<p>A web application firewall is the only layer here that can stop the exploit request before it reaches your code. Two kinds of update matter, and they do different jobs.</p>
<p><strong>Vendor rules for the CVE.</strong> The large CDNs and cloud providers ship rules within hours or days of disclosure. They only help if your WAF takes them automatically. On AWS WAF, a managed rule group follows the vendor's default version unless you pinned a static version; <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-managed-rule-groups-versioning.html">check which one you run</a>. Treat these rules as a stopgap that buys hours:</p>
<ul>
<li>React2Shell is a deserialization bug, and bypasses for WAF rules on deserialization bugs are common.</li>
<li>PHP2Shell is triggered by memory exhaustion during request setup, which is hard to describe as a request pattern.</li>
<li>Node2Shell rules cover inbound traffic only. A server that fetches a Brotli-compressed response from somewhere else isn't protected by its own WAF.</li>
</ul>
<p><strong>Blocks driven by your own signals.</strong> The second kind of update is one you make yourself: when something you trust says "this source is an attacker", add it to a block list. The hard part is the trust. Blocking on a noisy signal blocks customers.</p>
<p>A decoy gives you a signal you can trust. On the demo stand we built for our DevOpsDays Portugal talk in November 2026, a decoy path sat behind an AWS Application Load Balancer and AWS WAF. Nothing legitimate links to it, so anyone requesting it is scanning. A small responder added the source address to a WAF IP set (<a href="https://docs.aws.amazon.com/waf/latest/APIReference/API_UpdateIPSet.html"><code>UpdateIPSet</code></a>) and restarted the container. We measured:</p>
<ul>
<li>0.4 to 1.7 seconds from the request to the address being on the block list.</li>
<li>About 12 seconds until the WAF served a 403 to that address.</li>
<li>About 40 seconds for a clean container to replace the old one.</li>
<li>The first real scanner tripped it 10 minutes after the TLS certificate was issued.</li>
</ul>
<p>Be honest about what this is: an IP block is cheap for an attacker to get around, so give each block an expiry and don't count on it as containment. Its value is that it removes the mass scanners, which are most of the traffic in the first days of a *2Shell event. The WAF block action is from our conference build and isn't in a Compass release yet.</p>
<h2>Layer 3: a honeytoken for the window</h2>
<p>A honeytoken is a decoy credential that nothing legitimate ever uses, planted where an attacker looks. For *2Shell bugs the place is the workload's environment, because reading environment variables is the first thing malware does after it gets a shell.</p>
<p>The setup we use on AWS:</p>
<ol>
<li>A decoy AWS access key and a decoy database login in each container's environment, next to the real variables. The application never reads them.</li>
<li>One decoy per task definition, so the key ID names the compromised workload.</li>
<li>An EventBridge rule that matches any CloudTrail event from the decoy key.</li>
<li>One automatic response that can be undone: restart the task from its image, or deactivate the key.</li>
</ol>
<p>A trip has almost no false positives, because no legitimate process has a reason to use the key. That's what makes it safe to act on without a human. We call the principle <em>automate on certainty</em>: automate the response to signals that are near-certain, and keep symptom alerts (CPU, egress, cost) as context for a person.</p>
<p><strong>What it did in practice.</strong> React2Shell hit us on a Friday night in December 2025. CPU, egress and cost alerts all fired and were explained away as a database migration. Containment finished four days later. In October 2026 PHP2Shell got code execution in one of our containers. The attacker read the environment and tried the decoy AWS key. The alert reached Slack in under a minute, the task was restarted within another minute, and nothing was harmed.</p>
<p><strong>What it doesn't do.</strong> A honeytoken doesn't stop the exploit, and it doesn't see an attacker who never touches a decoy. The restart ends that session; if the image is still vulnerable, they can come back. It buys time for the patch.</p>
<p>To build one by hand, see <a href="https://beamreach.ai/docs/aws-canary-credentials.html">AWS canary credentials with Terraform</a>. For how it compares with GuardDuty, see <a href="https://beamreach.ai/docs/honeytokens-vs-guardduty.html">honeytokens vs GuardDuty</a>.</p>
<h2>Layer 4: patches that prove themselves</h2>
<p>Only the patch closes the vulnerability. Most teams' patch process today is a bot that opens version-bump pull requests. For this family of bugs that falls short in four ways.</p>
<p><strong>1. The bug usually isn't in a manifest.</strong> PHP2Shell is in the interpreter. The fix is a base image tag (<code>FROM php:8.3.30-fpm</code> to <code>8.3.36-fpm</code>), a distribution package pin, or a Lambda layer version. Dependabot's security updates are, in <a href="https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates">GitHub's words</a>, "triggered only for dependencies that are specified in a manifest or lock file", and GitHub's <a href="https://docs.github.com/en/code-security/dependabot/ecosystems-supported-by-dependabot/supported-ecosystems-and-repositories">supported ecosystems table</a> marks Docker as supported for version updates but not for security updates. A scheduled Docker version update may arrive days later, with no priority.</p>
<p><strong>2. A bump doesn't know what's exposed.</strong> Twenty open pull requests look the same whether the workload is an internal batch job or the public login page. In our React2Shell incident the setup included Dependabot pull requests waiting to be merged. The order has to come from exploitation data (<a href="https://www.cisa.gov/known-exploited-vulnerabilities-catalog">CISA KEV</a>, EPSS) and from whether the workload faces the internet.</p>
<p><strong>3. Merged isn't deployed.</strong> PHP-FPM workers keep the old binary until they restart. A container keeps the old image until it's rebuilt and redeployed. A patch process that ends at "merged" hasn't checked anything. Verification has at least three steps: the repository's CI, the image build where a Dockerfile changed, and a canary run on a staging copy that compares health checks, error rate and latency with the version before. Then a later scan has to see the fixed version actually running.</p>
<p><strong>4. Some fixes need someone to read the code.</strong> A plain bump doesn't work when the fix is a major version, a transitive dependency, a floating tag, or a copy bundled inside something else. Someone has to find out whether the vulnerable path is used, what the upgrade breaks, and what else must change. That investigation is what a language model is good at: reading the changelog and the call sites and proposing the edit. It's also where a model is most likely to be wrong, so its output has to go through the same verification as any other change, and a person merges.</p>
<p>So the patch path worth having is: a pull request per repository, opened without waiting for a ticket when a finding is exploited or exposed; edits that are deterministic where they can be; a model for the investigation where they can't; verification recorded on the pull request; and a human merge.</p>
<h2>Where Compass fits</h2>
<p><a href="https://github.com/beamreach-ai/compass">Compass</a> is our open-source (Apache 2.0) operations agent for AWS. It covers three of the four layers:</p>
<ul>
<li><strong>Inventory:</strong> its map records container images, Lambda runtimes and layers, what Dockerfiles install and what lockfiles pin, with internet exposure.</li>
<li><strong>Honeytokens:</strong> decoy AWS keys, database logins, S3 objects and SSH key pairs, planted as Terraform pull requests, with two undoable responses (restart an ECS task, deactivate an access key). <a href="https://github.com/beamreach-ai/compass/blob/main/docs/honeytokens.md">Docs</a>.</li>
<li><strong>Patch pull requests:</strong> it follows OSV, the CVE list, CISA KEV, EPSS and the distribution trackers hourly, opens the fix pull request without a click for exploited or internet-facing findings, checks CI, the image build and an optional staging canary, and never merges. <a href="https://github.com/beamreach-ai/compass/blob/main/docs/patching.md">Docs</a>.</li>
</ul>
<p>What it doesn't do today: it isn't a WAF and doesn't block the exploit request; its edits are deterministic version changes, so transitive dependencies, major upgrades and code changes wait in an inbox for a person; Java isn't on its default product list.</p>
<h2>FAQ</h2>
<p><strong>Can a WAF alone protect against PHP2Shell or React2Shell?</strong>
No. A WAF rule can block known exploit requests and buys time, but bypasses are common, PHP2Shell has no clean request pattern, and PHP's maintainers say no configuration change fully mitigates it. Install the fixed version.</p>
<p><strong>Is Dependabot enough to patch *2Shell vulnerabilities?</strong>
Not by itself. It handles library versions in manifests. PHP2Shell and Node2Shell were fixed by changing a base image, an OS package or the runtime, and nothing in a bump tells you whether the fix reached the running process.</p>
<p><strong>How fast are *2Shell vulnerabilities exploited?</strong>
React2Shell had a public exploit about a day after disclosure. PHP2Shell was exploited four days before the fixed releases shipped.</p>
<p><strong>What is the first thing to do when the next one is announced?</strong>
Find out which internet-facing workloads run the affected version. Then, in parallel: confirm your WAF has the vendor's rule, confirm the honeytokens in those workloads are armed, and open the patch pull requests.</p>
<p><strong>Do honeytokens replace alerts or GuardDuty?</strong>
No. Keep both. The honeytoken decides that something is an attack; the alerts explain what the attacker did.</p>
<h2>Sources</h2>
<ul>
<li>PHP: <a href="https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w">security advisory GHSA-w8hw-w9fx-j79w</a>, <a href="https://www.php.net/archive/2026.php">release announcements</a></li>
<li>AWS: <a href="https://aws.amazon.com/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/">PHP2Shell exploitation seen in MadPot before disclosure</a></li>
<li>Wiz: <a href="https://www.wiz.io/blog/php2shell-php-rce">PHP2Shell analysis</a></li>
<li>React: <a href="https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components">critical vulnerability in React Server Components</a>, <a href="https://nvd.nist.gov/vuln/detail/CVE-2025-55182">NVD CVE-2025-55182</a></li>
<li>CISA: <a href="https://www.cisa.gov/known-exploited-vulnerabilities-catalog">Known Exploited Vulnerabilities catalogue</a></li>
<li>GitHub: <a href="https://docs.github.com/en/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates">about Dependabot security updates</a>, <a href="https://docs.github.com/en/code-security/dependabot/ecosystems-supported-by-dependabot/supported-ecosystems-and-repositories">supported ecosystems</a></li>
<li>AWS WAF: <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-managed-rule-groups-versioning.html">managed rule group versioning</a>, <a href="https://docs.aws.amazon.com/waf/latest/APIReference/API_UpdateIPSet.html">UpdateIPSet</a></li>
<li>Talk: <a href="https://beamreach.ai/talks/one-fake-password.html">One Fake Password Is Worth More Than 10,000 Alerts</a>, DevOpsDays Barcelona, 14 November 2026</li>
</ul>
<hr />
<p><em>This article was first published on <a href="https://beamreach.ai/docs/protect-against-2shell-vulnerabilities.html">beamreach.ai</a>. It was drafted with AI assistance and reviewed by the author.</em></p>
<p><em>New critical and exploited vulnerabilities, one page each with checks and fixes: <a href="https://beamreach.ai/docs/cve-watch.html">CVE Watch</a>.</em></p>
]]></content:encoded></item></channel></rss>