Skip to main content

Malicious code in params-valid-js (npm)

0
Critical
Published: 06/17/2026 (06/17/2026, 04:22:54 UTC)
Source: GCVE Database
Product: params-valid-js

Description

The npm package 'params-valid-js' impersonates the legitimate 'request' package but contains malicious code that executes attacker-controlled Node.js code. Its middleware export spawns a detached child process running a script that fetches remote code and executes it with full module access, enabling remote code execution. This is a supply-chain attack affecting specific versions of the package.

Affected software

npmghsa
params-valid-js
Affected versions
=1.0.0=1.0.3=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: 09/08/2026, 11:38:27 UTC

Technical Analysis

The 'params-valid-js' npm package, posing as a simplified HTTP request client and copying identity metadata from the legitimate 'request' package, contains malicious code designed to execute arbitrary code remotely. The middleware function in 'index.js' launches a detached child process running 'lib/callers.js', which shadows the process environment with hardcoded values and fetches code from a remote server using axios. The fetched code is then executed dynamically using 'new Function.constructor', granting full Node.js module access to the attacker-controlled code. This behavior constitutes a supply-chain attack where any consumer invoking the middleware runs attacker-controlled code.

Potential Impact

Any application that installs and invokes the middleware export of the affected 'params-valid-js' package versions will execute arbitrary attacker-controlled code with full Node.js module privileges. This can lead to complete system compromise, data theft, or further malware deployment. The attack leverages supply-chain trust by impersonating a legitimate package and running code in a detached background process, making detection and mitigation more difficult.

Mitigation Recommendations

No official patch or remediation is currently documented for this malicious package. Users should immediately remove 'params-valid-js' versions 1.0.0, 1.0.1, and 1.0.3 from their dependencies and avoid installing or using this package. Verify dependencies and lockfiles to ensure this package is not included transitively. Monitor package sources carefully to avoid supply-chain attacks. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.

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-5988
Osv Schema Version
1.7.4
Aliases
["GHSA-4mh2-8f67-ph3q"]
Ecosystems
["npm"]

Threat ID: 6a96f318acd9273b49e4953a

Added to database: 09/01/2026, 15:45:28 UTC

Last enriched: 09/08/2026, 11:38:27 UTC

Last updated: 10/04/2026, 06:30:37 UTC

Views: 32

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