CVE-2026-48161: react18-use was vulnerable to malicious code execution via compromised commits
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.
Security readout for executives and security teams
Plain-English summary
A compromised react18-use repository commit ran attacker-controlled code when developers installed dependencies from an affected checkout. The npm package was not affected because this code was never published there. Any developer workstation that installed the affected commit should be considered fully compromised, including credentials and resources accessible under that user account.
Executive priority
Immediate for organizations with direct Git-based react18-use dependencies or developer clones from the affected window. Prioritize identifying exposed workstations, containing potential compromise, rotating reachable credentials, and reviewing account activity. Organizations using only the npm-published package have no exposure identified by the supplied sources.
Technical view
The affected commit added src/install.js to a postinstall script. It retrieved JavaScript from an attacker-controlled HTTPS endpoint, disabled TLS verification, and evaluated the response with require access. Execution avoided CI and cloud environments, indicating deliberate targeting of developer workstations. The attacker-hosted second stage is unavailable, preventing complete reconstruction of its behavior.
Likely exposure
Exposure is limited to systems running npm install from the affected Git checkout, direct-SHA reference, fork, or retained clone on or after 2026-05-19 01:07:01. The malicious commit was force-removed from the default branch but may persist elsewhere. The package published to npm did not contain it.
Exploitation context
The repository contained deliberately malicious installation code that would execute under the developer's permissions. However, the CVE is not listed in KEV, and the supplied sources provide no evidence confirming victim compromises or broader active exploitation. Because the second-stage payload is unavailable, its actual post-execution actions remain unknown.
Researcher notes
This is a malicious-code supply-chain event classified as CWE-506, not a conventional coding flaw. The known loader behavior supports an assumption of arbitrary Node-process execution, but the missing second stage prevents reliable determination of attacker objectives, persistence, credential theft, or downstream access. Historical clones and forks remain important forensic evidence.
Mitigation direction
Treat affected developer machines as compromised and begin incident response.
Rotate every credential accessible from each affected machine.
Audit relevant account activity since 2026-05-19 01:07:01.
Remove affected local clones, forks, and direct-SHA references.
Check the vendor advisory for any additional remediation guidance.
Validation and detection
Identify systems that installed dependencies from react18-use Git checkouts after the stated timestamp.
Search dependency definitions for the affected SHA or direct repository references.
Inspect retained clones and forks for the affected commit and src/install.js.
Review installation records and developer activity for npm install against affected checkouts.
Confirm credential rotations and account-activity reviews cover every affected developer identity.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-506: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
2Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-506 · source CWE mapping
Embedded Malicious Code
Embedded Malicious Code represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.