CVE-2026-48158
Last modified
CVE-2026-48158 is a critical-severity vulnerability rated 9.3/10 on the CVSS scale. use-context-selector is a React useContextSelector hook in userland Between 2026-05-18 15:57:18 and 2026-05-19 15:24:34, the default branch contained malicious commits 9d8481a513b7b0d1c0941b220c69b25de748641b through 6f2dae054ca014068bdbbb4db96006424d674124 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.
Description
use-context-selector is a React useContextSelector hook in userland Between 2026-05-18 15:57:18 and 2026-05-19 15:24:34, the default branch contained malicious commits 9d8481a513b7b0d1c0941b220c69b25de748641b through 6f2dae054ca014068bdbbb4db96006424d674124 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-18 15:57:18 should treat the machine as compromised, rotate every credential the machine could reach, audit account activity** since 2026-05-18 15:57:18, and clean local clones.
Metrics
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| dai-shi | use-context-selector | >= 9d8481a513b7b0d1c0941b220c69b25de748641b, <= 6f2dae054ca014068bdbbb4db96006424d674124 |
References
Timeline
- Published
- Last Modified
- Status
- Received
Frequently Asked Questions
What is CVE-2026-48158?
How severe is CVE-2026-48158?
How do I fix CVE-2026-48158?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-48152Budibase is an open-source low-code platform. Prior to 3.39.…8.1
- CVE-2026-48153Budibase is an open-source low-code platform. Prior to 3.39.…8.5
- CVE-2026-48154GoRest is a Golang starter kit built with the Gin framework …5.9
- CVE-2026-48155pypdf is a free and open-source pure-python PDF library. Pri…5.5
- CVE-2026-48156pypdf is a free and open-source pure-python PDF library. Pri…3.3
- CVE-2026-48157Slim is a PHP micro framework that enables users to write si…6.1
- CVE-2026-48159use-reducer-async is a React useReducer with async actions. …9.3
- CVE-2026-4816A Reflected Cross Site Scripting (XSS) vulnerability has bee…5.4
- CVE-2026-48160react-tracked provides state usage tracking with Proxies. Be…9.3
- CVE-2026-48161react18-use is a React 19 use hook shim. Between 2026-05-19 …9.3
- CVE-2026-48163MariaDB server is a community developed fork of MySQL server…7.2
- CVE-2026-48165MariaDB server is a community developed fork of MySQL server…7.2
Are you affected by CVE-2026-48158?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
