CVE-2026-48161: CWE-506: Embedded Malicious Code in dai-shi react18-use
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.
AI Analysis
Technical Summary
CVE-2026-48161 describes a supply chain attack in the react18-use package where malicious commits were introduced on the default branch between 2026-05-19 01:07:01 and 15:20:43. These commits added a postinstall script (src/install.js) that fetched a JavaScript payload from an attacker-controlled HTTPS endpoint with TLS verification disabled and executed it with require available. The payload was designed to run only on developer workstations, skipping CI and cloud environments. The malicious commits were removed by force-push, but local clones and forks may still contain them. The second-stage payload is unavailable, but full compromise of the affected developer machine is assumed. The package was never published to npm, limiting exposure to those who cloned the repository directly or used direct SHA URLs.
Potential Impact
The vulnerability allows remote attacker-controlled code execution on developer machines during npm install of an affected checkout. This can lead to full compromise of the developer environment with the permissions of the user running the Node process. Credentials accessible from the compromised machine may be stolen or misused. The attack specifically targets developer workstations, avoiding CI and cloud environments, thus potentially enabling further supply chain or internal network compromise.
Mitigation Recommendations
The malicious commits were removed by force-push, but no official patch or remediation is available since the package was not published to npm. Users who ran npm install on an affected checkout on or after 2026-05-19 01:07:01 should treat their machines as compromised. Recommended actions include rotating all credentials accessible from the machine, auditing account activity since the compromise date, and cleaning or recloning local repositories to remove the malicious commits. Avoid using direct SHA URLs or local clones that may contain the malicious commits.
CVE-2026-48161: CWE-506: Embedded Malicious Code in dai-shi react18-use
Description
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.
CVSS v4.0
Score 9.3critical
Affected software
dai-shi
react18-use
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-48161 describes a supply chain attack in the react18-use package where malicious commits were introduced on the default branch between 2026-05-19 01:07:01 and 15:20:43. These commits added a postinstall script (src/install.js) that fetched a JavaScript payload from an attacker-controlled HTTPS endpoint with TLS verification disabled and executed it with require available. The payload was designed to run only on developer workstations, skipping CI and cloud environments. The malicious commits were removed by force-push, but local clones and forks may still contain them. The second-stage payload is unavailable, but full compromise of the affected developer machine is assumed. The package was never published to npm, limiting exposure to those who cloned the repository directly or used direct SHA URLs.
Potential Impact
The vulnerability allows remote attacker-controlled code execution on developer machines during npm install of an affected checkout. This can lead to full compromise of the developer environment with the permissions of the user running the Node process. Credentials accessible from the compromised machine may be stolen or misused. The attack specifically targets developer workstations, avoiding CI and cloud environments, thus potentially enabling further supply chain or internal network compromise.
Mitigation Recommendations
The malicious commits were removed by force-push, but no official patch or remediation is available since the package was not published to npm. Users who ran npm install on an affected checkout on or after 2026-05-19 01:07:01 should treat their machines as compromised. Recommended actions include rotating all credentials accessible from the machine, auditing account activity since the compromise date, and cleaning or recloning local repositories to remove the malicious commits. Avoid using direct SHA URLs or local clones that may contain the malicious commits.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-20T23:12:43.032Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a7a53c0bf8831d539aba087
Added to database: 08/10/2026, 22:42:08 UTC
Last enriched: 08/10/2026, 22:56:08 UTC
Last updated: 09/25/2026, 03:51:48 UTC
Views: 169
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.