<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jerome Dh</title>
    <description>The latest articles on Forem by Jerome Dh (@jeromedh).</description>
    <link>https://forem.com/jeromedh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1090831%2F8dc9a816-d6ac-4c83-ae94-4f6a2f9ef8d1.jpeg</url>
      <title>Forem: Jerome Dh</title>
      <link>https://forem.com/jeromedh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jeromedh"/>
    <language>en</language>
    <item>
      <title>On Dec 11, 2025, the Next.js team announced two additional security issues affecting the React Server Components (RSC) protocol that were uncovered during follow-up analysis of the React2Shell patches: https://nextjs.org/blog/security-update-2025-12-11</title>
      <dc:creator>Jerome Dh</dc:creator>
      <pubDate>Fri, 26 Dec 2025 13:39:20 +0000</pubDate>
      <link>https://forem.com/jeromedh/on-dec-11-2025-the-nextjs-team-announced-two-additional-security-issues-affecting-the-react-16lb</link>
      <guid>https://forem.com/jeromedh/on-dec-11-2025-the-nextjs-team-announced-two-additional-security-issues-affecting-the-react-16lb</guid>
      <description>&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/jeromedh/how-i-detected-and-stopped-a-real-world-rce-attack-on-my-nextjs-app-cve-2025-55182-react2shell-2pmd" class="crayons-story__hidden-navigation-link"&gt;How I Detected and Stopped a Real-World RCE Attack on My Next.js App (CVE-2025-55182 / React2Shell)&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/jeromedh" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1090831%2F8dc9a816-d6ac-4c83-ae94-4f6a2f9ef8d1.jpeg" alt="jeromedh profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/jeromedh" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Jerome Dh
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Jerome Dh
                
              
              &lt;div id="story-author-preview-content-3102759" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/jeromedh" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1090831%2F8dc9a816-d6ac-4c83-ae94-4f6a2f9ef8d1.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Jerome Dh&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/jeromedh/how-i-detected-and-stopped-a-real-world-rce-attack-on-my-nextjs-app-cve-2025-55182-react2shell-2pmd" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Dec 13 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/jeromedh/how-i-detected-and-stopped-a-real-world-rce-attack-on-my-nextjs-app-cve-2025-55182-react2shell-2pmd" id="article-link-3102759"&gt;
          How I Detected and Stopped a Real-World RCE Attack on My Next.js App (CVE-2025-55182 / React2Shell)
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/nextjs"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;nextjs&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/security"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;security&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/react"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;react&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/react2shell"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;react2shell&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/jeromedh/how-i-detected-and-stopped-a-real-world-rce-attack-on-my-nextjs-app-cve-2025-55182-react2shell-2pmd#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            4 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;




&lt;p&gt;

&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://nextjs.org/blog/security-update-2025-12-11" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fh8dxkfmaphn8o0p3.public.blob.vercel-storage.com%2Fstatic%2Fblog%2Fsecurity-update-2025-12-11%2Ftwitter-card.jpeg" height="auto" class="m-0"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://nextjs.org/blog/security-update-2025-12-11" rel="noopener noreferrer" class="c-link"&gt;
            Next.js Security Update: December 11, 2025 | Next.js
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Two additional vulnerabilities have been identified in React Server Components. Users should upgrade to patched versions immediately.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fnextjs.org%2Ffavicon.ico%3Ffavicon.0c1ytwegij81u.ico"&gt;
          nextjs.org
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;




</description>
      <category>nextjs</category>
      <category>security</category>
      <category>react</category>
      <category>react2shell</category>
    </item>
    <item>
      <title>How I Detected and Stopped a Real-World RCE Attack on My Next.js App (CVE-2025-55182 / React2Shell)</title>
      <dc:creator>Jerome Dh</dc:creator>
      <pubDate>Sat, 13 Dec 2025 01:00:34 +0000</pubDate>
      <link>https://forem.com/jeromedh/how-i-detected-and-stopped-a-real-world-rce-attack-on-my-nextjs-app-cve-2025-55182-react2shell-2pmd</link>
      <guid>https://forem.com/jeromedh/how-i-detected-and-stopped-a-real-world-rce-attack-on-my-nextjs-app-cve-2025-55182-react2shell-2pmd</guid>
      <description>&lt;p&gt;Last week I experienced one of the most eye-opening security incidents in my time building web apps.&lt;br&gt;
My production Next.js application was actively targeted by attackers attempting &lt;strong&gt;remote code execution (RCE)&lt;/strong&gt;, and the root cause was a newly disclosed vulnerability in React Server Components.&lt;/p&gt;

&lt;p&gt;This is a write-up of what happened, how I diagnosed the issue, how I patched it, and what steps I took to harden my infrastructure.&lt;/p&gt;
&lt;h2&gt;
  
  
  1) The First Signs: Suspicious Logs in My Container
&lt;/h2&gt;

&lt;p&gt;Everything began when I noticed strange logs while checking my Docker containers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/bin/sh: curl: not found
/base64 -d | bash
ping: bad address
cat: can't open '.env.production'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Attackers were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attempting to download malicious scripts&lt;/li&gt;
&lt;li&gt;Trying to exfiltrate environment variables&lt;/li&gt;
&lt;li&gt;Dropping files into &lt;code&gt;/tmp&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Running reconnaissance commands&lt;/li&gt;
&lt;li&gt;Injecting base64-encoded payloads&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this stage, nothing persisted on the filesystem, and no malicious binaries survived container restarts, which was a good sign.&lt;/p&gt;

&lt;p&gt;Still, something was definitely trying to execute shell commands inside my app.&lt;/p&gt;

&lt;h2&gt;
  
  
  2) Investigating the Root Cause
&lt;/h2&gt;

&lt;p&gt;My first instinct was to examine my own server-side code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I reviewed all route handlers&lt;/li&gt;
&lt;li&gt;Audited every Server Action&lt;/li&gt;
&lt;li&gt;Scanned the codebase for any &lt;code&gt;child_process.exec&lt;/code&gt;, &lt;code&gt;spawn&lt;/code&gt;, or CLI wrappers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of my code executed shell commands, nothing even close.&lt;br&gt;
This led to the next logical suspicion: &lt;strong&gt;a framework-level vulnerability&lt;/strong&gt;, and that's exactly what it was.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Culprit: CVE-2025-55182 (React2Shell)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It turns out my app was running a Next.js version that used a vulnerable build of React Server Components, specifically the versions affected by &lt;a href="https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components" rel="noopener noreferrer"&gt;&lt;strong&gt;CVE-2025-55182 - React2Shell&lt;/strong&gt;&lt;/a&gt;.&lt;br&gt;
A critical, pre-authentication RCE caused by unsafe deserialization in React's RSC/Flight protocol.&lt;/p&gt;

&lt;p&gt;With a single crafted HTTP request, an attacker could trigger arbitrary code execution inside the Node.js server, even with no custom API endpoints.&lt;br&gt;
I tested the &lt;a href="https://www.trendmicro.com/en_us/research/25/l/CVE-2025-55182-analysis-poc-itw.html" rel="noopener noreferrer"&gt;publicly available PoC&lt;/a&gt; against my running app…&lt;br&gt;
And it worked.&lt;/p&gt;

&lt;p&gt;Suddenly everything made sense.&lt;/p&gt;
&lt;h2&gt;
  
  
  3) Fixing the Vulnerability
&lt;/h2&gt;

&lt;p&gt;The React team released patches, and Next.js provided an official tool to upgrade vulnerable packages.&lt;br&gt;
To fix the issue, I ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx fix-react2shell-next
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This updated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React RSC internals&lt;/li&gt;
&lt;li&gt;Next.js internals depending on the vulnerable code path&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I rebuilt and redeployed my app from clean Docker images.&lt;br&gt;
Then I tested the PoC again: &lt;strong&gt;Exploit failed. Completely.&lt;/strong&gt;&lt;br&gt;
This was the moment I knew the issue was resolved.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpaxqk148v2aatg3mfqlj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpaxqk148v2aatg3mfqlj.png" alt="Successful patch" width="800" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Running npx fix-react2shell-next on an affected Next.js app - confirming active vulnerabilities and applying the official patch.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  4) Hardening My Infrastructure (This Saved Me)
&lt;/h2&gt;

&lt;p&gt;Even though the vulnerability existed, the attacker never gained persistence or escalated to the host. Why?&lt;br&gt;
Because I had already hardened my Docker environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read-only root filesystem&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/tmp&lt;/code&gt; mounted with &lt;code&gt;noexec&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;All Linux capabilities dropped&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;no-new-privileges&lt;/code&gt; enabled&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;bash&lt;/code&gt;, &lt;code&gt;curl&lt;/code&gt; installed inside the container&lt;/li&gt;
&lt;li&gt;Isolated writable directories&lt;/li&gt;
&lt;li&gt;Nginx rate limiting and reverse-proxy filtering&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These security layers prevented: file execution, script downloads, persistence installation, cron modifications, privilege escalation, writing outside isolated volumes.&lt;br&gt;
In the end: &lt;strong&gt;the vulnerability allowed RCE, but the environment stopped it from becoming a full compromise.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5) Post-Incident Actions
&lt;/h2&gt;

&lt;p&gt;Even after patching, I also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rotated all environment secrets&lt;/li&gt;
&lt;li&gt;Re-deployed everything from clean images&lt;/li&gt;
&lt;li&gt;Validated no malicious files remained&lt;/li&gt;
&lt;li&gt;Reviewed logs to confirm attack attempts were blocked&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because as we often say: &lt;code&gt;Security&lt;/code&gt; is not just about &lt;code&gt;fixing one issue&lt;/code&gt;, it’s an ongoing process.&lt;/p&gt;

&lt;h2&gt;
  
  
  6) Key Takeaways for Developers
&lt;/h2&gt;

&lt;p&gt;Here’s what I learned and what you should be doing too:&lt;br&gt;
&lt;strong&gt;a. Patch fast&lt;/strong&gt;&lt;br&gt;
React2Shell was actively exploited in the wild. If your app uses Next.js + RSC, you must update.&lt;br&gt;
&lt;strong&gt;b. Least privilege saves lives&lt;/strong&gt;&lt;br&gt;
A read-only root filesystem alone can break 80% of real-world attack chains.&lt;br&gt;
&lt;strong&gt;c. Don’t rely on your own code being perfect&lt;/strong&gt;&lt;br&gt;
Framework vulnerabilities happen and attackers move fast.&lt;br&gt;
&lt;strong&gt;d. Use multiple layers of defense&lt;/strong&gt;&lt;br&gt;
No single measure stopped this attack, together, they did.&lt;br&gt;
&lt;strong&gt;e. Monitor everything&lt;/strong&gt;&lt;br&gt;
Logs revealed the attack before it was too late.&lt;/p&gt;

&lt;h2&gt;
  
  
  7) The Bottom Line
&lt;/h2&gt;

&lt;p&gt;This experience was intense but deeply educational. I’m sharing this story only a few days after the attack, but incidents like this can happen to anyone, and every victim has their own story behind it.&lt;/p&gt;

&lt;p&gt;It reinforced how important it is to stay up to date, harden your runtime environment, assume that vulnerabilities will happen, and prepare your infrastructure to handle them safely.&lt;/p&gt;

&lt;p&gt;If even one person reading this patches their application or improves their security setup, then writing this was absolutely worth it.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;References&lt;/u&gt;: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.trendmicro.com/en_us/research/25/l/CVE-2025-55182-analysis-poc-itw.html" rel="noopener noreferrer"&gt;https://www.trendmicro.com/en_us/research/25/l/CVE-2025-55182-analysis-poc-itw.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components" rel="noopener noreferrer"&gt;https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nextjs.org/blog/CVE-2025-66478" rel="noopener noreferrer"&gt;https://nextjs.org/blog/CVE-2025-66478&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>nextjs</category>
      <category>security</category>
      <category>react</category>
      <category>react2shell</category>
    </item>
  </channel>
</rss>
