Skip to main content

Malicious code in crypto-javas (npm)

0
Critical
Published: 08/05/2026 (08/05/2026, 12:59:52 UTC)
Source: GCVE Database
Product: crypto-javas

Description

The npm package 'crypto-javas' contains malicious code that harvests environment variables and CI metadata, then exfiltrates this data to an attacker-controlled backend. This behavior occurs both during the postinstall hook and every time the package is imported or required. The package masquerades as '@wizlabs/js-crypto' but is a typosquat with a placeholder repository and generic author information. This leads to exposure of sensitive CI secrets such as AWS credentials, GitHub tokens, and other pipeline secrets. The affected versions are 2.0.4, 2.0.7, and 2.0.8. No official patch or remediation is currently documented.

Affected software

npmghsa
crypto-javas
Affected versions
=2.0.4=2.0.7=2.0.8

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/19/2026, 16:23:23 UTC

Technical Analysis

The 'crypto-javas' npm package includes a postinstall script that executes setup.js, which collects nearly all environment variables except a small OS blocklist, along with CI job metadata like CI_JOB_ID, GITHUB_RUN_ID, project, commit, branch, and hostname. This data is sent via HTTPS POST to a backend URL and API key configurable through environment variables or configuration files. Additionally, the main entrypoint index.js calls autoExecute() at the module top level, causing the environment variable harvesting and exfiltration to occur on every import or require of the package. The package is presented misleadingly as '@wizlabs/js-crypto' but is a typosquat with a placeholder repository and a generic author handle, indicating malicious intent. This results in the leakage of sensitive CI/CD secrets including AWS credentials, GitHub tokens, NPM tokens, and CI job tokens to an attacker-controlled server.

Potential Impact

Exposure of sensitive environment variables and CI/CD pipeline secrets to an attacker-controlled backend can lead to unauthorized access to cloud resources, source code repositories, and package registries. This compromises the confidentiality and integrity of the development and deployment environment, potentially enabling further attacks or data breaches.

Mitigation Recommendations

No official patch or remediation is currently documented for this malicious package. Users should immediately remove 'crypto-javas' versions 2.0.4, 2.0.7, and 2.0.8 from their projects and replace them with trusted alternatives. Audit CI/CD pipelines and environment variables for potential exposure. Avoid using packages with suspicious repository URLs, generic author information, or typosquat names. Monitor for any unauthorized access using leaked credentials and rotate secrets if compromise is suspected.

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-12359
Osv Schema Version
1.7.4
Ecosystems
["npm"]

Threat ID: 6a735741bf8831d539157719

Added to database: 08/05/2026, 15:31:13 UTC

Last enriched: 08/19/2026, 16:23:23 UTC

Last updated: 09/07/2026, 22:06:06 UTC

Views: 16

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