TL;DR: A fake Cloudflare Captcha campaign in npm reused identical malicious HTML across 24 packages and leveraged mirrors such as unpkg and yarn to host trusted-looking phishing pages, with each package drawing 50 to 300 weekly downloads before removal, according to OX Security Platform. The pattern shows how package ecosystems can be abused as delivery and storage infrastructure, not just as malware distribution channels, and why identity and URL trust controls now need to cover developer tooling.
At a glance
What this is: OX Security Platform describes a fake Cloudflare Captcha campaign in npm that uses mirrored package pages as trusted-looking phishing infrastructure and reuses the same malicious HTML across 24 packages.
Why it matters: It matters to IAM and security teams because developer trust chains, mirror domains, and credentialed workflows can be abused as an entry path into broader identity and secrets exposure.
By the numbers:
- Each package usually reached between 50 and 300 weekly downloads before it was removed.
- The campaign included 24 distinct malicious packages sharing the exact same malicious code.
👉 Read OX Security Platform's analysis of the fake Cloudflare Captcha npm campaign
Context
npm package ecosystems are not only software distribution channels, they can also become trusted hosting layers for malicious content when mirrors render package files directly in the browser. That creates a governance gap between package ingestion and URL trust, because a legitimate-looking mirror can still deliver a phishing page or a browser-triggered payload. For identity and NHI teams, the risk is not the package install itself but the way developer workflows, web trust, and credential exposure intersect.
This campaign is a reminder that supply chain abuse increasingly targets the path around software rather than only the software itself. In practice, that means defenders need to treat package mirrors, redirected pages, and browser-rendered content as part of the attack surface. The pattern is typical of modern infrastructure abuse, where the adversary uses legitimate services to gain durability and credibility rather than relying on obviously malicious hosting.
Key questions
Q: How should security teams handle trusted package mirrors that serve HTML pages?
A: Security teams should treat package mirrors that render HTML as potential phishing hosts, not just as dependency distribution endpoints. The control shift is from package-only scanning to web-facing inspection, including URL reputation, browser policy, proxy logging, and DNS monitoring for direct page loads that originate from mirrored package content.
Q: Why do package mirror abuse campaigns create more risk than simple malicious packages?
A: They create more risk because the browser, not the installer, becomes the execution and trust boundary. A malicious package can survive as a rendered page on a mirror, which lets an attacker use legitimate infrastructure to deliver redirects, fake verification pages, and phishing content even after registry takedown.
Q: What do organisations get wrong about npm supply chain attacks?
A: They often focus on package provenance while underestimating runtime behaviour and local secret exposure. A malicious dependency is dangerous because it executes inside a trusted identity context and can read whatever that context already stores. Governance has to cover execution, storage, and revocation together.
Q: What should teams do immediately when a mirrored package starts serving malicious content?
A: Contain the exposure by blocking the mirror path at web and proxy layers, preserving logs for direct file requests, and checking whether developers or CI systems opened the HTML payload. Then verify whether the same content persists on mirrors after registry removal, because takedown alone may not end the campaign.
Technical breakdown
How npm mirrors become trusted phishing hosts
Some package mirrors expose individual files, including HTML, directly on trusted domains. When a browser loads that file, the user sees content served from a legitimate-looking host even though the file originated from a malicious package. This is materially different from downloading a tarball, because browser rendering activates web trust cues, redirects, and client-side logic. The attacker gains a hosting layer that benefits from reputation, caching, and distribution without owning the infrastructure. The real weakness is the assumption that mirrored package content is safe to browse, not just safe to install.
Practical implication: add mirror domains to phishing and URL reputation controls, not just package scanning pipelines.
Fake verification pages and redirect logic
The malicious HTML presents a fake Cloudflare verification page, then uses obfuscated JavaScript to call a remote server and fetch a next-stage destination. In the initial version, that destination was a typosquatted Microsoft domain, while later versions used a legitimate key-value storage domain to retrieve an encrypted redirect value. This is a common abuse pattern: the page itself is the lure, but the real control point is the remote decision engine that can swap destinations as defenders block them. The browser becomes the enforcement boundary, while the package acts as a durable delivery wrapper.
Practical implication: inspect outbound requests from browser-based package pages and block suspicious .html requests on mirror domains.
Why mirrored packages create persistence without persistence malware
Even when the official registry removes a package, mirrored copies can continue to expose the payload through cached or replicated endpoints. That gives the attacker a form of distribution persistence without needing malware persistence on the endpoint. The package may not compromise a machine on install, but it can remain available as a weaponised landing page. This matters because defenders often measure threat removal by registry takedown, while the actual exposure may live on in mirrors that still serve the same content to developers and CI systems.
Practical implication: monitor mirrored package URLs and proxy logs for direct HTML access after takedown, because removal from the registry is not the end of exposure.
Threat narrative
Attacker objective: The attacker wants to use trusted package infrastructure to deliver phishing or ClickFix payloads through browser trust, not through package installation itself.
- Entry occurs when a developer or automated workflow opens a mirrored npm package file that is rendered as HTML on a trusted-looking domain.
- Credential or trust abuse follows when the fake Cloudflare page and obfuscated script redirect the browser through attacker-controlled infrastructure or a typosquatted destination.
- Impact is delivered when the user is redirected into phishing or ClickFix-style execution, creating an opening for credential theft or malware staging.
NHI Mgmt Group analysis
Trusted developer infrastructure is becoming a phishing layer. When package mirrors render HTML directly in the browser, the trust boundary moves from software intake to web delivery. That means an npm package can behave less like a dependency and more like a hosted lure, especially when mirrors preserve the content after removal from the source registry. For identity and access teams, the lesson is that trust decisions must extend beyond signing and install controls to the browser paths developers actually follow.
Browser-rendered supply chain content creates a new form of persistence. The package may be removed quickly, but the mirrored HTML can remain reachable long enough to keep delivering redirects and deception. That is a governance gap around lifecycle offboarding for malicious content, not a traditional endpoint persistence problem. The named concept here is mirror persistence: malicious package content survives through mirrored distribution points even after source takedown. Practitioners should treat mirror exposure as an operational control problem, not an incident closure assumption.
Identity risk appears when phishing infrastructure targets developer and CI trust. The campaign does not depend on code execution at install time, which is why conventional package scanning can miss the practical threat. Instead, it exploits the relationship between trusted repositories, browser sessions, and the credentials that developers use around those sessions. That intersects with IAM because developer identities, session tokens, and secret-bearing workflows are all reachable once the lure succeeds.
Security teams need to widen supply chain telemetry to include web reputation and DNS signals. A package ecosystem attack is no longer only a dependency graph issue. It is also a URL reputation, proxy visibility, and browser egress problem. That changes how controls are layered across NIST CSF, MITRE ATT&CK, and developer protection workflows. The practical conclusion is that package governance now needs web telemetry as a first-class control input.
The category is shifting from malware delivery to infrastructure abuse. Threat actors are learning that legitimate services can provide better durability than obviously malicious hosting. This blurs the line between supply chain compromise, phishing, and content hosting abuse, which complicates categorisation and response. Security programmes should respond by treating public registries, mirror networks, and browser-rendered package content as part of the attack surface, not as benign distribution plumbing.
What this signals
Mirror persistence will become a recurring control problem for developer supply chain teams because takedown no longer guarantees removal from the user-facing attack surface. When browser-rendered content survives across mirrors, web reputation and DNS controls need to sit alongside package controls, and the operational boundary starts to look much closer to identity-aware access governance than classic dependency management.
The practical implication for programmes is that secret hygiene, developer workflow monitoring, and browser protection are converging. If an attacker can reach developers through a mirrored package page, the next risk is often not the package itself but the credentials, sessions, or tokens those users already hold. That is why identity telemetry and browser telemetry need to be reviewed together rather than in separate operational silos.
For practitioners
- Classify mirror domains as phishing infrastructure Add unpkg, npmmirror, yarn, tencent, and similar mirror domains to phishing detection, URL reputation, and browser protection rules when they serve rendered package files.
- Search for direct HTML access in proxy and DNS logs Look for direct .html requests to mirrored package paths, especially when the request lands on a trusted mirror domain rather than the source registry.
- Tune developer browser controls for package-based lures Block or warn on browser navigation to package mirror content when the file type is HTML, because installation safety does not equal browsing safety.
- Cross-check takedowns against mirror exposure Treat registry removal as partial remediation only. Verify whether the same package content remains reachable through mirrors before closing the incident.
Key takeaways
- This campaign shows that package mirrors can function as phishing infrastructure, which moves supply chain defence beyond install-time checks.
- The exposure is not limited to the registry copy of the package, because mirrored HTML can remain reachable after takedown.
- Effective response requires browser, DNS, and proxy controls to work together with package governance and developer identity oversight.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK and OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | TA0001 Initial Access; TA0006 Credential Access; TA0011 Command and Control | The campaign uses trusted infrastructure to gain entry and redirect users through attacker-controlled flows. |
| NIST CSF 2.0 | PR.AC-4 | Package mirror abuse turns trust and access decisions into an exposure point. |
| NIST SP 800-53 Rev 5 | AC-4 | Content flow control matters when trusted mirrors serve attacker-controlled HTML. |
| CIS Controls v8 | CIS-9 , Email and Web Browser Protections | The attack depends on browser delivery, reputation gaps, and redirect handling. |
| OWASP Non-Human Identity Top 10 | NHI-06 | Secret-bearing developer workflows remain reachable once trust boundaries fail. |
Map mirrored package lures to initial access and command-and-control paths, then block suspicious redirects and outbound beacons.
Key terms
- Mirror Persistence: Mirror persistence is the survival of exposed content across multiple repositories, caches, and private channels after the original source has been removed. It is a containment problem, not just a discovery problem, because deleting the primary copy rarely removes the surrounding copies that keep the material accessible.
- Browser-Rendered Supply Chain Abuse: Browser-rendered supply chain abuse happens when a dependency ecosystem is used to host or distribute content that becomes dangerous only when viewed in a browser. The attack shifts from installation risk to web-delivered deception, which makes browser controls and URL reputation part of supply chain defence.
- Trusted Infrastructure Phishing: Trusted infrastructure phishing uses legitimate services, domains, or distribution networks to make malicious content appear safe. The technique exploits reputation, caching, and user familiarity, so defenders have to treat trust signals as attackable rather than inherently reliable.
- Mirror Domain Reputation: Mirror domain reputation is the security assessment of package mirror hosts based on how they render, cache, and expose content to users. It becomes important when a mirror can serve HTML or redirects directly, because browser trust may be stronger than the real security posture warrants.
What's in the full article
OX Security Platform's full analysis covers the operational detail this post intentionally leaves for the source:
- The exact package names, publication timestamps, and takedown status across the full 24-package cluster
- IOC details for the typosquatted Microsoft domain, the api.keyval.org redirect flow, and the packaged HTML payload
- The HTML and JavaScript logic that drives the fake verification page and remote redirect decisions
- Package-by-package mirror exposure examples that show how the same content appears on unpkg and other mirror services
Deepen your knowledge
The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, secrets management, and workload identity. It is built for practitioners who need to connect identity controls to real operational risk across software delivery and access lifecycles.
Published by the NHIMG editorial team on August 25, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org