CVE-2026-54051 Splunk · SPL

Detect CVE-2026-54051: network-ai npm Package OS Command Injection in Splunk

Detects exploitation of CVE-2026-54051, a critical OS command injection vulnerability (CWE-78) in the npm package 'network-ai' versions prior to 5.9.1. Improper neutralization of special elements allows attackers to inject arbitrary OS commands through the package's API, potentially leading to full system compromise. A public PoC is available.

MITRE ATT&CK

Tactic
Execution Persistence Privilege Escalation

SPL Detection Query

Splunk (SPL)
spl
index=* sourcetype IN ("XmlWinEventLog:Microsoft-Windows-Sysmon/Operational", "linux_audit", "osquery:results")
(ParentImage="*node.exe" OR ParentCommandLine="*network-ai*" OR cmdline="*network-ai*")
(
  (Image IN ("*\\cmd.exe", "*\\powershell.exe", "*\\sh", "*\\bash", "*\\dash"))
  OR
  (CommandLine IN ("*;*", "*&&*", "*||*", "*`*", "*$(*", "*%0a*", "*%0d*"))
)
| eval risk=case(
    match(CommandLine, "wget|curl|nc |ncat|python|perl|ruby"), "critical",
    match(CommandLine, "/etc/passwd|/etc/shadow|whoami|id |net user"), "high",
    true(), "medium"
  )
| stats count min(_time) as first_seen max(_time) as last_seen values(CommandLine) as commands values(Image) as child_processes by host, user, ParentCommandLine, risk
| where count > 0
| sort - risk, - count
critical severity medium confidence

Detects OS command injection exploitation of network-ai npm package by identifying Node.js processes spawning suspicious shells or executing commands with injection characters.

Data Sources

SysmonLinux Auditosquery

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operationallinux_auditosquery:results

False Positives & Tuning

  • Legitimate administrative Node.js scripts invoking shell utilities
  • Automated test frameworks running system commands via Node.js
  • DevOps tooling using network-ai for legitimate diagnostics
  • Build pipelines executing shell commands from Node.js environments

Other platforms for CVE-2026-54051


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1CVE-2026-54051 Basic Command Injection via network-ai

    Expected signal: Process creation event: node spawns sh or bash child process with command line containing 'whoami'; file creation event for /tmp/cve_2026_54051_poc.txt

  2. Test 2CVE-2026-54051 Reverse Shell Injection Simulation

    Expected signal: Process creation: node → bash with command containing /dev/tcp; network connection event from bash process to 127.0.0.1:4444

  3. Test 3CVE-2026-54051 Persistence via Cron Injection

    Expected signal: Process creation: node → sh → crontab with new entry; crontab file modification event; subsequent periodic execution of /tmp/beacon.sh if not cleaned up

  4. Test 4CVE-2026-54051 Credential Harvesting via /etc/passwd Read

    Expected signal: Process creation: node → sh with 'cat /etc/passwd' in command line; file read event on /etc/passwd by shell child process of Node.js; file creation of /tmp/passwd_exfil.txt

Unlock Pro Content

Get the full detection package for CVE-2026-54051 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections