Skip to main content

react18-use CVE-2026-48161

| EUVDEUVD-2026-55848 CRITICAL
Embedded Malicious Code (CWE-506)
2026-08-10 GitHub_M
9.3
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Push malicious postinstall commits to repo
  2. Delivery
    Victim clones/forks affected checkout
  3. Exploit
    Developer runs npm install
  4. Install
    postinstall executes src/install.js
  5. C2
    Fetch remote payload over TLS-unverified HTTPS
  6. Execute
    Evaluate attacker code as user
  7. Impact
    Harvest credentials, full workstation compromise

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Code review, malicious code detection
Exploitation Conditions

Exploitation requires (1) possession of an affected checkout - a local clone, fork, or direct-SHA/URL reference of react18-use containing the commit range starting 7b79148d1495a2505f9277da295a98cf176f4496 (the force-push removed it from the live default branch, so a fresh clone of the current HEAD is NOT affected), (2) the victim running npm install (or any lifecycle install triggering the postinstall hook) against that checkout, and (3) the attacker-controlled HTTPS payload endpoint being reachable at install time to deliver the second stage. Exploitation is deliberately LIMITED to interactive developer workstations: the payload fingerprints and skips execution on CI and cloud/serverless environments, so build pipelines are not hit. Additional limiting factors are that the package was never on npm (registry version installs are unaffected) and the malicious window on the live branch was only ~14 hours (2026-05-19 01:07:01-15:20:43 UTC), narrowing who obtained a poisoned copy.

Impact

The input CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H, base 9.3) rates this as critical with full confidentiality, integrity, and availability loss, which is consistent with arbitrary remote code execution on the victim host. One caveat: the vector encodes UI:N, but real exploitation is not truly no-interaction - a developer must first obtain an affected checkout (clone/fork/direct-SHA) and then run npm install, so a UI/attack-requirement component is arguably understated. Offsetting that, the malware runs fully automatically once install is triggered and needs no privileges. There is no EPSS score, no CISA KEV listing, and no separately published proof-of-concept in the provided data, so there is no evidence of broad automated exploitation; however, because the malicious code is the payload, 'exploitability' is effectively guaranteed for anyone who installs an affected checkout. The narrowing factors - a ~14-hour malicious window, never published to npm, force-pushed away, and a niche package - mean real-world blast radius is likely small and targeted rather than widespread, but for any individual who did install during/after the window the impact is total. Net: treat as a high-priority incident-response trigger for exposed developers, but low aggregate prevalence.

Exploit ScenarioDerived

A developer following a tutorial or dependency reference clones react18-use (or installs it via a git/direct-SHA URL pinned to the poisoned commit) and runs npm install to build locally. The postinstall hook silently executes src/install.js, which pulls attacker JavaScript over TLS-verification-disabled HTTPS and evaluates it in-process, giving the attacker code execution as the developer and access to any credential, SSH key, or cloud token reachable from that workstation. No separate public PoC is needed because the malicious code is self-contained in the checkout.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 10, 2026

Software supply-chain compromise of react18-use, a small React 19 use-hook shim maintained by dai-shi, in which malicious commits pushed to the GitHub default branch between 2026-05-19 01:07:01 and 15:20:43 UTC added a postinstall script (src/install.js) that runs attacker-controlled remote code on developer machines during npm install. The malicious commits were later removed by force-push and the package was never published to npm, but local clones, forks, and direct-SHA URLs still carry them, so any npm install against an affected checkout still executes the payload today. There is no public exploit identified at time of analysis and it is not on CISA KEV, but the embedded code itself constitutes working malware (CWE-506); anyone who ran npm install on a developer workstation on or after 2026-05-19 01:07:01 should assume full host compromise.

RemediationAI

No traditional versioned patch applies because the package was never on npm; the fix is that the malicious commits were removed from the default branch by force-push, so remediation is to eliminate poisoned checkouts and treat exposed machines as compromised. Delete and re-clone any local copy of react18-use so no working tree contains the commit range starting 7b79148d1495a2505f9277da295a98cf176f4496, and purge any fork or pinned direct-SHA/URL dependency referencing those commits; never run npm install against an old checkout. Because the payload disabled TLS verification and executed remote code, anyone who ran npm install on a developer machine on or after 2026-05-19 01:07:01 UTC should assume full host compromise: rotate every credential the machine could reach (SSH keys, cloud/CI tokens, npm and GitHub tokens, browser sessions, password-manager secrets), audit all account and repo activity since 2026-05-19 01:07:01 UTC, and reimage or forensically clean the workstation. As a general control, disable npm install scripts by default (npm config set ignore-scripts true, or use npm install --ignore-scripts) - noting the trade-off that some legitimate packages rely on postinstall builds and may need manual attention. See the advisory at https://github.com/dai-shi/react18-use/security/advisories/GHSA-32xh-vg5f-64fm.

Affected VersionsENISA

react18-use 7b79148d1495a2505f9277da295a98cf176f4496, ≤ 7b79148d1495a2505f9277da295a98cf176f4496

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected component is a Node.js/npm package distributed via GitHub (cpe:2.3:a:dai-shi:react18-use). The abuse vector is npm's lifecycle-scripts mechanism: an entry in the package's postinstall hook automatically executes src/install.js whenever a consumer installs dependencies. That script fetched a JavaScript second-stage payload from an attacker-controlled HTTPS endpoint (whose URL was overridable via an environment variable), deliberately disabled TLS certificate verification, and evaluated the response with eval/require-style dynamic execution so the remote code ran inside the Node process with require available and the invoking user's full privileges. Root cause is CWE-506 (Embedded Malicious Code) - this is not a memory-safety or logic bug but intentionally planted malware. The code included environment fingerprinting that skipped execution on CI and cloud/serverless runners, specifically to evade automated build sandboxes and hit interactive developer workstations where high-value credentials (SSH keys, cloud tokens, npm/GitHub tokens, browser sessions) live.

Know when React18 Use gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.8 HIGH

Payload is delivered over the network but requires the developer to obtain a poisoned checkout and run npm install, so UI:R; once triggered it runs as the user with full C/I/A loss, PR:N, no scope change.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

react18-use is a React 19 use hook shim. Between 2026-05-19 01:07:01 and 2026-05-19 15:20:43, the default branch contained malicious commits 7b79148d1495a2505f9277da295a98cf176f4496 through 7b79148d1495a2505f9277da295a98cf176f4496 that executed remote attacker-controlled code on developer machines during npm install. The commits were removed by force-push, but local clones, forks, and direct-SHA URLs may still contain them, and npm install against an affected checkout will still execute the code today. The package was not published to npm. src/install.js was added and wired into the postinstall script. It fetched a JavaScript payload from an attacker-controlled HTTPS endpoint (configurable via an environment variable), disabled TLS verification, and evaluated the response as code with require available. Execution was deliberately skipped on CI and cloud/serverless environments, targeting developer workstations. The second-stage payload was attacker-hosted and cannot be reconstructed. Assume full compromise of anything reachable from a Node process with the user's permissions. Those who ran npm install against an affected checkout on a developer machine on or after 2026-05-19 01:07:01 should treat the machine as compromised, rotate every credential the machine could reach, audit account activity since 2026-05-19 01:07:01, and clean local clones.

Executive ViewAI

Why It Matters

A critical supply chain vulnerability in react18-use, a small npm package, compromised developer workstations that installed this package during a 14-hour window in May 2026 through malicious postinstall scripts executing arbitrary code. Any developer on affected machines must assume complete host compromise with full access to source code repositories, development credentials, and build environments. This creates immediate risk of source code theft and potential downstream compromise of software supply chains through infiltrated build pipelines.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include: (1) Do not install or update react18-use; (2) Audit all node_modules directories to verify packages came from npm registry, not local git clones; (3) Implement npm lockfile integrity verification with hash validation; (4) Enforce strict version pinning in dependency management, eliminating installations from direct git SHAs; (5) Deploy EDR/XDR solutions on all developer workstations to detect postinstall script execution anomalies; (6) Audit system logs for unexpected process creation or network connections during npm install operations; (7) Implement code review and commit signing requirements with verification that committers are authorized personnel.

Threat Intelligence Overview

EPSS Score
0.4%
Top 65% exploitable
Prevalence
Low
niche React hook shim, never on npm, GitHub-only, tiny footprint
Social Media
4
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy