Dependabot Spread Malware to 895 Repos in Minutes
Dependabot security flaw exposed: poisoned npm package spread malware to 895 repos in minutes. How attackers weaponized automated dependency updates.
The Problem No One Expected: Your Update Bot Works for the Attacker Too
Automated dependency updates solve a real headache. Nobody wants to manually track hundreds of packages, and outdated dependencies are a known attack surface — in 2023 alone, over 25,000 new vulnerabilities were reported to the National Vulnerability Database. Tools like Dependabot and Renovate exist to keep projects current with minimal friction.
But that same automation has a dark side. When a malicious package lands on npm, these bots don't pause to investigate. They do exactly what they were built to do: open a pull request, pass CI checks, and — if automerge is enabled — push compromised code into production without a single human ever looking at it.
According to GitGuardian's analysis, a poisoned version of the popular axios package (v1.14.1) was uploaded on March 31st. Within five minutes, the first modification to a package.json on a public repository appeared, pushed by Dependabot. Not five hours. Five minutes.
That is the new supply chain attack playbook: publish a malicious version, sit back, and let the bots do the distribution.
How 895 Repositories Got Infected
The axios incident is the clearest example of how dependency bots become unwitting malware couriers. Here is the timeline, based on GitGuardian's research:
- Minute 0 — Malicious axios 1.14.1 published to npm.
- Minute 5 — First Dependabot-pushed
package.jsonchange observed on a public repo. - Minute 40 — The
jhipster/generator-jhipsterrepository receives a Dependabot PR for the malicious version. - Minute 56 — That PR is merged via an automerge workflow in the CI/CD pipeline.
Across the full infection window, at least 895 public repositories upgraded axios to the compromised version. Out of 527 repositories analyzed in detail, 154 pull requests were opened by bots: 111 by Dependabot and 30 by Renovate.
Real numbers: 95 of those 154 bot-generated PRs (60%) were merged into the main branch. And 50 of them — roughly one-third — were merged by a bot user without any human interaction at all.
Put simply: the attacker published one malicious package and automated tooling did the rest, distributing it across hundreds of codebases faster than any security team could react.
Why Bot-Generated PRs Get a Free Pass
There is a psychological component here that matters as much as the technical one. Developers treat bot-generated PRs differently than human-authored code changes. A PR from a colleague gets scrutinized. A PR from Dependabot bumping a patch version? It gets a glance at most.
This trust is not irrational — 99% of the time, those automated bumps are exactly what they appear to be. But that track record of being harmless is precisely what makes these PRs the perfect trojan horse. The average JavaScript project depends on more than 1,000 packages when including transitive dependencies, according to TurboStarter's analysis. No team reviews every single one of those bumps line by line.
The problem gets worse with automerge configurations. Renovate supports automergeMinor and automergePatch presets that merge updates automatically once CI passes. Dependabot integrates with GitHub Actions workflows that can do the same. These features exist for good reason — nobody wants to manually approve 20 patch bumps every Monday morning. But they also mean that a malicious patch release can go from npm to your production branch without a human ever seeing it.
Honest take: automerge is not inherently bad. But automerge without guardrails is a malware fast lane.
This Is Not a Hypothetical — It Has Happened Before
The axios incident is the most data-rich case, but it is not the first time attackers exploited the trust placed in dependency bots.
In July 2023, Checkmarx documented a campaign where threat actors compromised hundreds of GitHub repositories — both public and private — by pushing commits that appeared to come from Dependabot. The commit messages were fabricated to mimic Dependabot's formatting. The attackers had stolen victims' GitHub personal access tokens and used them to push malicious code that:
- Exfiltrated GitHub project secrets to a command-and-control server
- Modified JavaScript files with password-stealer malware
- Added a new GitHub Action file (
hook.yml) that triggered on every push, sending secrets and variables to an attacker-controlled endpoint
Most victims in that campaign were Indonesian user accounts. The attack window was July 8–11, just four days.
This was a different attack vector — stolen tokens rather than a poisoned package — but it exploited the same fundamental weakness: developers trust commits and PRs that look like they came from Dependabot.
The Detection Gap
GitHub does offer Dependabot malware alerts, which notify repository owners when a package in their default branch is flagged as malicious. Each alert includes a link to the affected file, details about the malicious package (name, affected versions, patched version when available), and remediation steps.
But there are significant limitations:
- npm only: Dependabot malware alerts are currently available only for packages in the npm ecosystem. Python, Go, Ruby, and other ecosystems have no equivalent coverage.
- Delay: New malware takes time to appear in the GitHub Advisory Database. Only advisories reviewed by GitHub trigger alerts. During the axios incident, the malicious version was live and being distributed by bots before any advisory existed.
- Privacy trade-off: GitHub never publicly discloses malicious dependencies for any repository, which means the community cannot see which projects were affected or learn from their exposure.
The core issue is timing. The gap between a malicious package being published and it being flagged in an advisory database is exactly the window that attackers exploit. And during that window, bots are actively distributing the compromised version.
Dependency Cooldowns: The 80% Solution
The most practical defense against this class of attack is surprisingly simple: do not install new package versions immediately after they are published.
Security researcher William Woodruff analyzed major supply chain attacks from recent years and found a consistent pattern. Most attacks follow the same structure: compromise a project, introduce a malicious change, and then race against the clock before the community notices and upstream remediates. The gap between public exploitation and remediation is typically very small — hours or days.
Here are the actual attack windows from documented incidents:
| Attack | Window of Opportunity |
|---|---|
| Ultralytics (phase 2) | 1 hour |
| rspack | 1 hour |
| Nx | 4 hours |
| tj-actions | 3 days |
| xz-utils | ~5 weeks (outlier) |
According to ByteIota's analysis, 80% of major supply chain attacks from the past 18 months could have been blocked with a 7-day dependency cooldown. Eight of ten examined attacks had exploit windows under one week.
A "cooldown" is a waiting period between when a dependency is published and when your tooling considers it eligible for adoption. During that window, security vendors and the open-source community can identify and flag problems while your project stays on the last known-good version.
The xz-utils attack is the notable exception — the attacker spent years building trust before inserting a backdoor, resulting in a 5-week window that would survive most cooldown periods. But that level of sophistication is rare. For the vast majority of supply chain attacks, a simple delay eliminates the risk entirely.
How to Configure Cooldowns
Both Dependabot and Renovate support cooldown configurations natively. Here is what the setup looks like.
Dependabot
In your .github/dependabot.yml:
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
cooldown:
default-days: 7
Renovate
In your renovate.json:
{
"minimumReleaseAge": "7 days"
}
Seven days is the recommended starting point. It catches the vast majority of attacks without meaningfully delaying legitimate updates. A six-month-old dependency might require significant code changes to upgrade, but a one-week delay on a patch version is almost never a problem.
Key takeaway for business: adding two lines of configuration blocks 80% of the most common supply chain attack pattern. That is one of the highest security-to-effort ratios available.
Automerge: Use It, But With Guardrails
Disabling automerge entirely is one option, but it creates a different problem. Renovate's ability to group updates is one of its strongest features — instead of 20 PRs for 20 different plugins, it bundles them into a single PR, reducing noise by 80–90% in complex projects. Dependabot, by contrast, creates a separate PR for every single update. Logging in to find 50 separate Dependabot PRs is overwhelming and leads to the exact behavior attackers exploit: rubber-stamping everything to clear the queue.
Here is what we recommend for automerge policies:
- Never automerge major version bumps. These can contain breaking changes and should always be reviewed.
- Require cooldowns before any automerge. A patch release that has existed for 7 days and passes all CI checks is far safer than one published 5 minutes ago.
- Automerge only with full test coverage passing. If your test suite does not cover the integration points with a dependency, automerging that dependency is blind trust.
- Review security-flagged PRs immediately. Dependabot creates security PRs immediately regardless of schedule because, as Thomas Lambert notes, a critical CVE should never wait until next Monday. These deserve human eyes, fast.
- Pin critical dependencies. For packages that handle authentication, encryption, or data processing, consider pinning to exact versions and upgrading manually after review.
Renovate vs. Dependabot: Security-Relevant Differences
Both tools can be configured securely, but they differ in ways that affect the attack surface.
| Feature | Dependabot | Renovate |
|---|---|---|
| Package managers | 30+ | 90+ |
| Update grouping | One PR per update | Flexible grouping (reduces review fatigue) |
| Platform support | GitHub only | GitHub, GitLab, Bitbucket, Azure DevOps |
| Cooldown support | cooldown: default-days |
minimumReleaseAge |
| Malware alerts | npm only (via GitHub Advisory Database) | No built-in malware alerting |
| PR limits | Hard limit of 10 security, default 5 version | Configurable |
| Automerge | Via GitHub Actions workflows | Native configuration with status check verification |
Renovate's grouping capability is a genuine security advantage, not just a convenience feature. Fewer PRs means each one gets more attention. When Dependabot generates 50 individual PRs, the human tendency is to batch-approve them — which is exactly how 50 malicious updates got merged without review in the axios incident.
On the other hand, Dependabot's GitHub-native malware alerts provide a layer of protection that Renovate lacks entirely. If a package is flagged in the GitHub Advisory Database, Dependabot will alert repository owners. Renovate has no equivalent mechanism.
Honest take: neither tool is "more secure" out of the box. Security depends entirely on configuration. An improperly configured Renovate installation with aggressive automerge is more dangerous than a well-configured Dependabot setup with cooldowns, and vice versa.
Beyond Cooldowns: A Layered Defense
Cooldowns are the single highest-impact change, but a robust supply chain security posture includes additional layers:
Lock files and integrity checks
Always commit your lock files (package-lock.json, yarn.lock, pnpm-lock.yaml). These contain integrity hashes that verify the exact package content matches what was expected. If an attacker replaces a package's contents after publication, integrity checks will catch it.
Limit bot permissions
The 2023 campaign documented by Checkmarx succeeded because stolen personal access tokens had broad repository permissions. Use fine-grained tokens with the minimum scope required. If your dependency bot only needs to open PRs, it should not have permission to merge them.
Review CI/CD workflows triggered by bots
The jhipster repository merged a malicious update in 56 minutes because the CI/CD pipeline was configured to automerge Dependabot PRs after tests passed. Audit your workflow files — specifically look for conditions like if: github.actor == 'dependabot[bot]' that grant special trust to bot-authored changes.
Monitor for fake bot commits
Attackers in the 2023 campaign fabricated commit messages to look like Dependabot output. Verify that bot commits actually originate from the expected bot account, not from a compromised user token mimicking bot formatting.
Use npm audit before deploying
Running npm audit in your CI pipeline catches known vulnerabilities before they reach production. It will not catch zero-day malicious packages (those have not been flagged yet), but it adds another checkpoint.
What This Means for Your Project
The supply chain threat model has changed. Attackers no longer need to trick developers into installing malicious packages manually. They publish a poisoned version and let the automation handle distribution. The same bots that protect against known vulnerabilities become the delivery mechanism for unknown ones.
In our experience with 11 projects running on this server, every one that uses npm dependencies is exposed to this attack pattern. The fix is not to abandon automation — manual dependency management at scale is worse, leading to stale packages with known vulnerabilities that sit unpatched for months.
The fix is to add friction in the right places.
Key takeaway for business:
- Add a 7-day cooldown to every project using Dependabot or Renovate. Two lines of configuration. Blocks 80% of supply chain attacks. No meaningful downside for non-security updates.
- Disable blind automerge. If updates auto-merge, they should only do so after the cooldown period and with full CI passing. Never automerge major versions.
- Treat bot PRs with the same scrutiny as human PRs. The 60% merge rate on bot-generated malicious PRs exists because teams have been trained to trust the bot label. That trust needs to be recalibrated.
The cost of implementing these changes is measured in minutes. The cost of a compromised dependency reaching production — stolen secrets, exfiltrated data, password-stealer malware injected into your frontend — is measured in something much larger.
Frequently Asked Questions
How can malware spread through routine Dependabot and Renovate pull requests without scrutiny?
These bots automatically detect new package versions and open PRs to upgrade. If a malicious version is published to npm, the bot creates a PR for it within minutes — the same way it would for any legitimate update. Teams that enable automerge or habitually approve bot PRs without review will merge the compromised version into their codebase automatically.
How does Dependabot detect malware in npm dependencies?
Dependabot sends malware alerts when a package in a repository's default branch is flagged as malicious in the GitHub Advisory Database. Alerts are generated automatically for npm packages. The limitation is timing — new malware takes time to appear in the database, and attacks exploit that gap.
What are the key security differences between Renovate and Dependabot?
Dependabot offers native malware alerts through the GitHub Advisory Database (npm only). Renovate has no built-in malware detection but provides better PR grouping, which reduces the rubber-stamping problem. Both support cooldowns. Renovate works across multiple platforms; Dependabot is GitHub-only.
Why are bot-generated dependency updates more likely to be merged without review?
Developers develop trust patterns. Bot PRs are routine, frequent, and almost always benign. Over time, reviewing them feels like a formality. GitGuardian's data shows 60% of bot-generated malicious PRs were merged, with one-third merged entirely by automation — no human involved.
How can I mitigate supply-chain attack risks when using dependency update bots?
Configure a 7-day cooldown (minimumReleaseAge in Renovate, cooldown: default-days in Dependabot). Disable automerge for major versions. Require full CI to pass before any automerge. Commit lock files with integrity hashes. Limit bot token permissions to the minimum scope needed. Run npm audit in your deployment pipeline.
This article is based on publicly available sources and may contain inaccuracies.


