Malicious code in cors-security (npm)
The npm package cors-security version 1.0.1 contains malicious code that executes attacker-controlled JavaScript code within the consumer's Node.js process. This occurs because the package's CommonJS entry point fetches code from a hardcoded remote host (workconfig.vercel.app) with TLS verification disabled and executes it with access to the require function. This behavior is unrelated to the package's advertised functionality and is only present in the CommonJS variant.
AI Analysis
Technical Summary
The [email protected] npm package exposes a getPlugin() API that performs an HTTPS GET request to a hardcoded domain (workconfig.vercel.app) with TLS certificate verification disabled (rejectUnauthorized: false). The response body from this request is passed directly to new Function('require', data)(require), allowing execution of arbitrary JavaScript code controlled by the remote server inside the consumer's Node.js environment with access to the require function. This remote code loading is present only in the CommonJS entry point and is unrelated to the package's advertised SVG utility purpose. Any consumer invoking the returned function from this package executes whatever code the remote operator serves at that time.
Potential Impact
Consumers of [email protected] who require the CommonJS entry point and invoke the returned function will execute arbitrary, attacker-controlled JavaScript code with full access to Node.js require, potentially leading to remote code execution within their environment. The disabled TLS verification increases the risk of man-in-the-middle attacks. This compromises the security and integrity of applications using this package version.
Mitigation Recommendations
No official patch or remediation is currently documented. Consumers should immediately stop using [email protected] and remove it from their dependencies. Avoid requiring the CommonJS entry point or invoking the getPlugin() API. Monitor for updates or advisories from the package maintainers or npm registry. Consider using alternative, trusted packages for SVG utilities.
Malicious code in cors-security (npm)
Description
The npm package cors-security version 1.0.1 contains malicious code that executes attacker-controlled JavaScript code within the consumer's Node.js process. This occurs because the package's CommonJS entry point fetches code from a hardcoded remote host (workconfig.vercel.app) with TLS verification disabled and executes it with access to the require function. This behavior is unrelated to the package's advertised functionality and is only present in the CommonJS variant.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The [email protected] npm package exposes a getPlugin() API that performs an HTTPS GET request to a hardcoded domain (workconfig.vercel.app) with TLS certificate verification disabled (rejectUnauthorized: false). The response body from this request is passed directly to new Function('require', data)(require), allowing execution of arbitrary JavaScript code controlled by the remote server inside the consumer's Node.js environment with access to the require function. This remote code loading is present only in the CommonJS entry point and is unrelated to the package's advertised SVG utility purpose. Any consumer invoking the returned function from this package executes whatever code the remote operator serves at that time.
Potential Impact
Consumers of [email protected] who require the CommonJS entry point and invoke the returned function will execute arbitrary, attacker-controlled JavaScript code with full access to Node.js require, potentially leading to remote code execution within their environment. The disabled TLS verification increases the risk of man-in-the-middle attacks. This compromises the security and integrity of applications using this package version.
Mitigation Recommendations
No official patch or remediation is currently documented. Consumers should immediately stop using [email protected] and remove it from their dependencies. Avoid requiring the CommonJS entry point or invoking the getPlugin() API. Monitor for updates or advisories from the package maintainers or npm registry. Consider using alternative, trusted packages for SVG utilities.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-12357
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a735744bf8831d539159c91
Added to database: 08/05/2026, 15:31:16 UTC
Last enriched: 08/05/2026, 17:20:16 UTC
Last updated: 09/07/2026, 23:51:50 UTC
Views: 21
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.