This hunt hypothesis targets adversaries exploiting the React Server Remote Code Execution vulnerability (CVE-2025-5518) in Next.js applications to execute arbitrary code through specific error message patterns. Proactively hunting for these indicators within Azure Sentinel is critical because successful exploitation allows attackers to gain immediate command-line access, potentially leading to full system compromise before standard alerts trigger.
rule EXPL_RCE_React_Server_Next_JS_CVE_2025_66478_Errors_Dec25 {
meta:
description = "Detects error messages caused by the exploitation of the React Server Remote Code Execution Vulnerability (CVE-2025-55182) in Next.js applications (CVE-2025-66478). This can also be caused by vulnerability scanning."
author = "Florian Roth"
reference = "https://github.com/Malayke/Next.js-RSC-RCE-Scanner-CVE-2025-66478"
date = "2025-12-05"
score = 65
id = "6baeb522-6299-56a2-be27-21c6b668439b"
strings:
$s1 = "[Error: NEXT_REDIRECT]"
$s2 = "digest: 'uid=0(root) gid=0(root)"
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Here are 3-5 specific false positive scenarios for the Detects error messages caused by the exploitation of the React Server Remote Code Execution Vulnerability (CVE-2025-5518) rule, along with suggested filters and exclusions:
Automated Security Scanning Traffic
Source IP belonging to the internal security scanning subnet (e.g., 10.50.40.0/24) or filter events where the User-Agent header contains known scanner identifiers like “Nessus” or “Qualys”.CI/CD Pipeline Integration Tests
svc-github-actions, jenkins-build) or filter events occurring within the defined maintenance window (e.g., 02:00–04:00 UTC) where these pipelines are active.Scheduled Data Migration and Backup Jobs