Skip to main content

Malicious code in cors-security (npm)

0
Critical
Published: 08/05/2026 (08/05/2026, 12:57:59 UTC)
Source: GCVE Database
Product: cors-security

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

npmghsa
cors-security
Affected versions
=1.0.1

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

AILast updated: 08/05/2026, 17:20:16 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses