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.
Published: 2026-08-10
Score: 9.3 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in the react18-use repository, a React 19 use hook shim, where malicious commits were added between 2026‑05‑19 01:07:01 and 2026‑05‑19 15:20:43. A postinstall script in the default branch fetched a JavaScript payload from an attacker‑controlled HTTPS endpoint, disabled TLS verification, and evaluated the response as code with require. When a developer ran npm install on the affected checkout, this script executed with the Node process’s permissions, allowing the attacker to execute arbitrary code on the developer’s workstation. This results in a full compromise of the machine and any credentials or services accessible from that Node process.

Affected Systems

The affected system is the dai‑shi:react18-use package. Any local clone, fork, or direct‑SHA checkout of the default branch during the specified timeframe contains the malicious commits. Local copies remain vulnerable after the force‑push until they are replaced with a clean version. The package was never published to npm, so the risk is limited to developers who pulled or cloned the repository and performed npm install.

Risk and Exploitability

The CVSS score of 9.3 indicates a severe vulnerability. The EPSS score is not available and the vulnerability is not listed in CISA’s KEV catalog. The attack vector is the untrusted postinstall hook that runs automatically during npm install on a developer’s workstation. If a developer has a clone containing the malicious commits, the attacker can control the HTTPS endpoint or the injected code, leading to full control over the Node process and any resources the user can access. The exploitability is high because the malicious payload executes without any special conditions beyond a local clone and npm install.

Generated by OpenCVE AI on August 11, 2026 at 00:05 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Delete all local clones, forks, or references to the affected repository and re‑clone from a clean source after the force‑push to remove the malicious commits.
  • Clear the npm cache with `npm cache clean --force` and install again to ensure no cached malicious postinstall script remains.
  • Temporarily disable postinstall hooks by running `npm config set ignore-scripts true` or removing the postinstall entry from package.json, and only re‑enable after verifying the repository’s integrity.
  • Rotate any credentials that could be accessed by the Node process on the compromised machine and audit account activity for the period after 2026‑05‑19 01:07:01.
  • Monitor the affected systems for suspicious processes or network activity and maintain secure backups to enable recovery if needed.

Generated by OpenCVE AI on August 11, 2026 at 00:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 11 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 11 Aug 2026 15:45:00 +0000

Type Values Removed Values Added
First Time appeared Dai-shi
Dai-shi react18-use
Vendors & Products Dai-shi
Dai-shi react18-use

Mon, 10 Aug 2026 22:45:00 +0000

Type Values Removed Values Added
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.
Title react18-use was vulnerable to malicious code execution via compromised commits
Weaknesses CWE-506
References
Metrics cvssV4_0

{'score': 9.3, 'vector': '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'}


Subscriptions

Dai-shi React18-use
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-11T17:08:12.075Z

Reserved: 2026-05-20T23:12:43.032Z

Link: CVE-2026-48161

cve-icon Vulnrichment

Updated: 2026-08-11T17:08:07.361Z

cve-icon NVD

Status : Received

Published: 2026-08-10T23:16:51.343

Modified: 2026-08-11T17:17:59.513

Link: CVE-2026-48161

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-11T14:21:17Z

Weaknesses