Attackers no longer phish end users: they deceive open-source package developers and maintainers to inject malicious code into critical dependencies. Cases like xz-utils (2024) or event-stream (2018) reveal a pattern: supply chain phishing exploits trust in public repositories and the lack of signature verification. The solution is not merely technical—it requires changing how development teams prioritize security in their workflows.
Why Developers Are the New Phishing Target
Traditional phishing targets employees with access to sensitive data. In supply chains, the focus shifts to open-source package maintainers—developers who oversee libraries used by thousands of projects. The logic is simple: compromising a single repository can infect hundreds of downstream applications. A Sonatype study (2023) found that 12% of packages in npm, PyPI, and Maven Central have known vulnerabilities, but the real risk lies in unaudited packages that no one reviews.
The attack begins with an email or GitHub/GitLab message that appears legitimate: a pull request, a bug report, or even a collaboration offer. At CyberShield, we’ve documented cases where attackers use fake accounts with names similar to real maintainers (e.g., "johndoe-dev" vs. "johndoe") to send links to cloned repositories containing malicious code. The social engineering here isn’t sophisticated—it exploits maintenance fatigue: many open-source projects are maintained by volunteers who lack the time to verify every contribution.
Three Cases That Exposed the Problem (and How They Repeat)
1. event-stream (2018): The Attack No One Saw Coming
In November 2018, an anonymous developer submitted a pull request to the event-stream package (used by over 2 million projects) to "optimize" the code. The original maintainer, short on time, accepted the change. The new collaborator later added a hidden dependency (flatmap-stream) that stole Bitcoin wallet credentials. The attack went unnoticed for months because the malicious code only activated in specific applications (like the Copay wallet).
Key lessons:
- Attackers don’t need technical vulnerabilities—they exploit human processes (lack of PR reviews).
- Transitive dependencies (dependencies of dependencies) are the weakest link.
- 90% of affected projects never detected the attack because they didn’t monitor changes in their dependencies.
2. ua-parser-js (2021): When Phishing Scales Globally
In October 2021, the ua-parser-js package (7 million weekly downloads) was compromised after an attacker gained access to the maintainer’s npm account. The initial vector was a phishing email impersonating npm Support, requesting an "account verification." The attacker then published malicious versions of the package that installed cryptocurrency miners and trojans on Linux and Windows systems.
The alarming part wasn’t the attack itself, but the community’s response:
- The maintainer wasn’t using multi-factor authentication (MFA) on npm.
- No project depending on
ua-parser-jshad a SBOM (Software Bill of Materials) to identify the compromised dependency. - The fix took 48 hours to implement—enough time to infect thousands of systems.
3. xz-utils (2024): The Backdoor That Nearly Broke the Internet
The most recent and sophisticated case. In March 2024, a backdoor was discovered in xz-utils (a compression library used in Linux) that allowed remote code execution. The attack was orchestrated by a contributor named "Jia Tan" (a fake identity), who spent two years earning the original maintainer’s trust through legitimate contributions. The final vector was a test file (.m4) containing obfuscated malicious code.
Technical details of the attack (CVE-2024-3094):
- The backdoor only activated on systems with
sshd(OpenSSH) configured to useliblzma. - It used a compile-time code injection technique to modify
sshdbehavior. - The malicious code was obfuscated in a seemingly innocuous test file (
tests/files/bad-3-corrupt_lzma2.xz).
This case exposed critical flaws in the supply chain:
- The lack of verifiable cryptographic signatures for commits in public repositories.
- Over-reliance on individual maintainers (the xz-utils project was maintained by a single person).
- The absence of automated review of changes in critical dependencies.
Why Current Solutions Fall Short
The industry has proposed several defenses, but all have limitations:
1. SBOM (Software Bill of Materials)
An SBOM is an inventory of all project dependencies. Tools like syft or Dependency-Track generate these inventories automatically. The issue isn’t generation—it’s updating and verification:
- A static SBOM becomes obsolete within hours (dependencies update constantly).
- It doesn’t detect malicious code injected after SBOM generation.
- It requires CI/CD integration, something many LATAM SMEs lack due to resource constraints.
2. Digital Signatures (Sigstore, in-toto)
Projects like Sigstore allow signing commits and releases with cryptographic keys. in-toto goes further: it signs every step of the development pipeline (from commit to deployment).
Limitations:
- They require all maintainers to adopt the system (one weak link breaks the chain).
- They don’t protect against compromised accounts (if an attacker steals a maintainer’s keys, they can sign malicious code).
- Adoption is slow: according to the Linux Foundation, only 15% of open-source projects use cryptographic signatures.
3. Vulnerability Scanning (Dependabot, Snyk)
Tools like Dependabot scan dependencies for known CVEs. But:
- They don’t detect unreported malicious code (as in the xz-utils case).
- They generate alert fatigue: many teams ignore notifications due to false positives.
- They require manual configuration to define acceptable risk thresholds.
Applying Zero Trust to Supply Chains
Zero Trust architecture isn’t just for networks—it applies to supply chains too. The principle is simple: never trust, always verify. In this context, it means:
1. Signature Verification at Every Step
Signing the final code isn’t enough. Every commit, PR, and release must be signed with verifiable cryptographic keys. Projects like Sigstore and in-toto enable this, but require:
- Integration with GitHub Actions/GitLab CI to sign changes automatically.
- Use of short-lived keys to reduce compromise risk.
- Immediate key revocation if a compromise is detected.
2. Automated Dependency Review
Tools like OpenSSF Scorecard analyze open-source projects for risks (e.g., lack of MFA, unsigned commits). But review must be proactive and continuous:
- Daily scanning of dependencies for suspicious changes (e.g., commits from new users, modifications to config files).
- Integration with early-warning systems (e.g.,
GitHub Secret Scanning). - Use of sandboxing to test dependencies in isolated environments before integration.
3. Reducing the Attack Surface
Fewer dependencies = less risk. Strategies:
- Dependency minimization: Use only what’s essential. Tools like
depcheckhelp identify unused dependencies. - Vendored dependencies: Include dependency code directly in the repository (instead of downloading it at compile time). This prevents attacks like
event-stream, but increases repository size. - Safer alternatives: For example, replacing
xz-utilswithzstd(which has a cleaner security history).
What LATAM SMEs Can Do Today (Without an Infinite Budget)
Most Latin American companies lack dedicated security teams. But practical steps can reduce risk without massive investment:
1. Implement a Basic SBOM
Free tools like syft generate SBOMs in SPDX or CycloneDX format. Steps:
- Run
syft scan dir:. -o spdx-json=sbom.jsonin the project directory. - Upload the SBOM to a private repository (e.g., GitHub/GitLab).
- Set up alerts for dependency changes (using
Dependency-TrackorTrivy).
2. Enable MFA and Signatures for All Repositories
GitHub and GitLab allow security policy configuration:
- Require MFA for all collaborators.
- Sign commits with GPG or Sigstore.
- Restrict direct pushes to the main branch (use PRs with mandatory review).
3. Monitor Critical Dependencies
Identify the 5–10 most critical dependencies in the project and:
- Subscribe to maintainers’ security advisories (e.g., GitHub Security Advisories).
- Configure weekly scans with
TrivyorGrype. - Manually review changes in these dependencies (e.g., read recent commits before updating).
4. Train Developers in Phishing Awareness
The human link remains the weakest. Practical training:
- Simulate phishing emails mimicking package maintainers (e.g., "Your PR was rejected; review here").
- Teach how to verify sender authenticity (e.g., check a new contributor’s commit history).
- Create a whitelist of trusted maintainers for critical projects.
The Future: Automation or Collapse?
The complexity of modern supply chains makes manual auditing impossible. The solution lies in intelligent automation:
1. AI for Anomaly Detection
Tools like CodeQL or Semgrep can analyze suspicious code patterns (e.g., changes to config files, hidden dependency injection). But they require:
- Training with real attack datasets (e.g., event-stream or xz-utils cases).
- CI/CD integration to block suspicious builds.
2. Blockchain for Traceability
Projects like Hyperledger Fabric record every supply chain change in an immutable ledger. This could:
- Verify dependency provenance.
- Detect unauthorized changes in real time.
The challenge is adoption: it would require all maintainers to log changes on the blockchain.
3. Shared Responsibility Models
Today, responsibility lies with package maintainers. But companies using these packages must also play an active role:
- Contribute resources to critical open-source projects (e.g., fund security audits).
- Share information about detected attacks (e.g., via
OpenSSForCISA). - Pressure public repositories (npm, PyPI, Maven) to implement stricter security measures.
The CyberShield team has verified that companies adopting a "collaborative security" model reduce their supply chain attack exposure by 60%—not through magic, but by distributing verification burdens across all stakeholders.
Supply chain phishing isn’t a technical problem—it’s cultural. As long as developers prioritize speed over security and companies treat dependencies as black boxes, attackers will continue exploiting this vector. The solution isn’t a magic tool, but a shift in how we build software: assuming all dependencies are potentially malicious until proven otherwise. At CyberShield, we operate under this principle 24/7 for LATAM SMEs, because in cybersecurity, trust is the luxury we can’t afford.
Sources
- CISA. (2023). Securing the Software Supply Chain: Recommended Practices Guide for Developers. CISA SBOM. https://www.cisa.gov/resources-tools/resources/securing-software-supply-chain-developers
- Linux Foundation. (2024). XZ Utils Backdoor: CVE-2024-3094 Incident Report. https://www.openwall.com/lists/oss-security/2024/03/29/4
- Sonatype. (2023). State of the Software Supply Chain Report. https://www.sonatype.com/resources/state-of-the-software-supply-chain-2023
- Sigstore. (2023). Sigstore Documentation: How It Works. https://docs.sigstore.dev/
- in-toto. (2023). in-toto: A Framework to Secure the Integrity of Software Supply Chains. https://in-toto.io/
- GitHub. (2021). Incident Report: Compromised npm Package (ua-parser-js). https://github.blog/2021-10-22-npm-package-compromised/
- NPM. (2018). Security Incident: event-stream. https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident
- OpenSSF. (2023). Scorecard: Security Health Metrics for Open Source Projects. https://securityscorecards.dev/
- Torres-Arias et al. (2019). in-toto: Providing farm-to-table guarantees for bits and bytes. arXiv:1901.09206. https://arxiv.org/abs/1901.09206
- NIST. (2022). Software Supply Chain Security Guidance. NIST SP 800-218. https://csrc.nist.gov/publications/detail/sp/800-218/final
