Skip to main content
    Open Source Supply Chain

    event-stream npm Dependency Attack (2018)

    Breach Year

    2018

    Breach Type

    Open Source Supply Chain

    TPRM Lesson

    Package maintainer handoffs are supply chain risk events.

    What was the event-stream npm Dependency Attack breach?

    The event-stream npm attack was a 2018 incident in which a new maintainer of the popular event-stream JavaScript package added a malicious dependency (flatmap-stream) that targeted the Copay bitcoin wallet, attempting to exfiltrate wallet credentials from downstream users. It is the reference case for maintainer-handoff supply chain risk.

    event-stream is the case that made 'the maintainer handed the keys to a stranger' a real supply chain scenario.

    In 2018 event-stream was a widely used Node.js utility package with millions of weekly downloads. Its original maintainer, having lost interest, handed publish rights to a volunteer who offered to help.

    That volunteer subsequently added a new dependency, flatmap-stream, containing obfuscated malicious code targeting the Copay cryptocurrency wallet's bundled builds. The malicious payload attempted to exfiltrate wallet credentials. GitHub, npm and security researchers disclosed the compromise in November 2018.

    What Was It?

    event-stream is a widely used open-source npm package. Its trust model relied on a single volunteer maintainer, which is the norm across most of open source.

    What Happened?

    Mid-2018. The original maintainer handed publish rights to a new volunteer.

    September 2018. The new maintainer added flatmap-stream as a dependency.

    October 2018. Malicious obfuscated code was pushed to flatmap-stream.

    November 2018. Researchers identified and disclosed the compromise.

    How Did It Happen Technically?

    • Maintainer handoff transferred publish rights without vetting.
    • New maintainer introduced a dependency they controlled.
    • That dependency later shipped obfuscated code that activated only in Copay builds.
    • Payload attempted to exfiltrate wallet credentials to an attacker-controlled endpoint.

    Why This Was a TPRM Failure

    • Maintainer handoff blind spot. No downstream signal when maintainership changed.
    • Transitive dependency risk. Malicious code lived one hop away from the direct dependency.
    • Targeted activation. Payload only triggered in specific builds, evading generic scanners.
    • No lockfile discipline. Many downstream users pulled latest versions automatically.
    • Ecosystem trust. Downloads-per-week treated as a proxy for safety.

    Business Impact

    • Copay wallet users at risk of credential theft.
    • Widespread npm ecosystem cleanup and audit.
    • Loss of trust in transitive open-source dependencies.
    • Accelerated adoption of dependency pinning and provenance tooling.

    Consequences

    The incident accelerated npm's investment in package signing, provenance and maintainer verification, and pushed enterprises toward lockfile discipline, dependency review bots and SBOM tooling.

    What Most People Miss About This Breach

    The attacker did not need to compromise anything. The maintainer handed them the keys. This is the standard operating model of open source, not a bug.

    Practical TPRM Lessons

    1. Monitor maintainer changes on critical dependencies.
    2. Enforce lockfiles and pin transitive versions.
    3. Review new dependencies added by direct dependencies.
    4. Adopt SBOM tooling and dependency review bots.
    5. Prefer packages with multiple maintainers and known governance.
    6. Restrict which packages can run install scripts.
    7. Sandbox dependency execution in CI.
    8. Treat open-source maintainers as fourth parties.

    Technical Protection Checklist

    A. Identity and Access. Least privilege for build agents; no network egress by default.

    B. SaaS and API Integrations. Package registry mirrors with approval workflows.

    C. Software Supply Chain. Lockfiles, SBOMs and provenance verification enforced.

    D. File Transfer and Data Exchange. Sandboxed builds; no arbitrary outbound during install.

    E. Data Protection. Wallet or credential data never touched by build-time code.

    F. Vendor Incident Response. Monitor security advisories on all direct dependencies.

    G. Fourth-Party Risk. Transitive dependency maintainers tracked.

    H. Board and Executive Reporting. Open-source dependency posture reported quarterly.

    Final TPRM Takeaway

    "Open source runs on trust between strangers. Your job is to verify that trust before shipping it."

    Frequently Asked Questions

    What was the event-stream attack?

    A 2018 supply chain attack in which a new maintainer of the event-stream npm package added a malicious dependency targeting the Copay bitcoin wallet.

    Why is it considered a third-party breach?

    Downstream users were compromised through a trusted open-source dependency chain.

    How did it happen?

    A volunteer maintainer took over publish rights and later introduced obfuscated malicious code via a new dependency.

    What was exposed?

    Copay wallet users were targeted for cryptocurrency credential theft.

    What was the impact?

    Ecosystem-wide audit, loss of trust in transitive dependencies and accelerated adoption of provenance tooling.

    What controls could have reduced the risk?

    Lockfile discipline, dependency review bots, SBOMs and sandboxed install scripts.

    What should TPRM teams learn?

    Maintainer handoffs are supply chain events. Track them like vendor ownership changes.

    What is the biggest lesson?

    Open-source dependencies are third parties whose maintainership can change without warning. Build the controls accordingly.

    Public Sources Reviewed

    All claims in this case study are grounded in verified public reporting.

    TPRM Blog

    Related TPRM analysis from the blog

    Continue learning with the latest breach alerts, regulatory updates, and analyst playbooks from blog.learntprm.com.

    Visit blog.learntprm.com
    Safe Security - founding sponsor of LearnTPRM.comFounding Sponsor
    For CISOs, TPRM leads and vendor risk program owners

    Autonomous TPRM. 90% less manual effort.

    Almost every case here was findable before it happened

    Read enough third-party breaches and the pattern is brutal: an undisclosed fourth party, an expired certification, an exposure that sat on the internet for weeks. Nobody was lazy - the signals simply arrive faster than a human review cycle. The SAFE TPRM AI Co-Worker watches for them continuously.

    This is for you if you own a third-party risk program - roughly 100+ vendors, quarterly reassessments, DORA / NIS2 / OCC pressure and no new headcount coming. The link opens Safe Security's platform page, not a gated form.

    Five correlated data dimensions per vendor, refreshed continuously across the whole portfolio.

    Zero-touch due diligenceContinuous monitoring across 5 dimensionsAI-powered risk scoring workflows
    • The Fourth-Party Discovery agent finds the undisclosed downstream provider before it becomes your incident.
    • The Outside-In agent detects new vulnerabilities, misconfigurations and breaches as they surface.
    • The Threat Intel agent tracks leaked credentials, filings and legal events per vendor.
    Evaluate SAFE for my organization

    For security and risk leaders assessing a TPRM platform. Opens safe.security in a new tab.

    25+

    AI agents

    90%

    Less manual effort

    None

    Additional headcount

    200+

    Organizations globally

    End to end

    Intake to offboarding

    Ready to Prove You're a TPRM Warrior?

    Most people talk about risk management. Few can prove their expertise under pressure.

    Start Your Free Certification