Composer Supply Chain Security: 2.10 and 2.11 in Practice

A practical guide for PHP and Laravel teams to enable Composer's malware blocking, cooldown and advisory policies, and fix the habits attackers exploit.

Composer Supply Chain Security: 2.10 and 2.11 in Practice

For years, PHP teams treated composer update as routine housekeeping. In 2026 that stopped being safe. The self-spreading supply-chain worms that had already hit npm and PyPI reached Packagist, and Composer answered with new protections in versions 2.10 and 2.11. In my view, Composer supply chain security is now a configuration job that every PHP and Laravel team should finish soon, and most have not started it yet.

This article explains what changed, how to switch the new policies on, and which habits around them matter just as much.

What happened on Packagist

On 30 April 2026, attackers took over intercom/intercom-php version 5.0.2. They overwrote the existing version with code that turned the package into a Composer plugin. According to Semgrep's analysis, the plugin ran during installation, downloaded the Bun runtime and launched an obfuscated credential stealer. You did not need to call the package from your code. Installing it was enough.

The same analysis points out a structural weakness. Packagist does not store uploaded files. It indexes tags from a registered Git repository, so if a maintainer's GitHub account is compromised and a malicious tag is pushed, Packagist can serve that version within minutes.

In May, Socket reported eight Packagist packages with malicious code hidden in package.json rather than composer.json. These targeted PHP projects that also ship JavaScript build tooling. Teams that scan only Composer metadata would have missed them.

Composer's lead maintainer, Nils Adermann, has made the point plainly in a recent talk: one compromised GitHub account, or one badly secured GitHub Action, is now enough to reach a widely used PHP package, and the number of attacks keeps rising.

What Composer 2.10 and 2.11 add

Since March 2026, Packagist.org has imported malware detection results from Aikido. Flagged versions are marked on the website and in the package data Composer reads. Packagist also added delisting of confirmed malware for older Composer clients, package freezing during active account takeovers, and organisation-level package ownership to replace shared company accounts. All of this is described in Packagist's supply chain security update.

Composer 2.10 introduced native malware filtering and a single config.policy object that covers security advisories, abandoned packages and malware. As Private Packagist explains, flagged versions:

  • are removed before update, require and create-project run
  • are blocked at composer install, even if they are already in your lock file
  • are reported by composer audit

There are two limits. A project can switch malware blocking off in its own composer.json, and Composer versions older than 2.10 have no policies at all, so they keep installing flagged versions.

The 2.10 release also moved older settings into the new object: audit.block-insecure became policy.advisories.block, and audit.ignore-severity became policy.advisories.ignore-severity. The 2.10.0 release also fixed several security issues: less token leakage in URL output, a fixed https-enforcement bypass, and git credentials no longer left in mirror configuration.

Composer 2.11 adds a cooldown policy that holds back newly published versions for a period you choose. Packagist's reasoning is simple. Malicious versions are usually pulled or detected within hours of publication, so a short waiting period gives detection time to work before a new version reaches your builds.

Setting up Composer supply chain security policies

Here is an example project configuration. These options are new, so check the exact key names against the official Composer documentation for the version you run.

{
  "config": {
    "policy": {
      "advisories": { "block": true },
      "malware": { "block": true },
      "cooldown": { "period": "7 days" }
    }
  }
}

You can also set the cooldown globally on a build machine:

composer --version
composer config --global policy.cooldown.period "7 days"
composer audit

A few practical notes:

  • Don't switch malware blocking off. Search all your repositories for "block": false under the malware policy. If you genuinely need an exception, scope it to a single package and record the reason in the pull request.
  • Plan for urgent patches. A cooldown must not delay a security fix. Use a short-lived, per-package exemption for that release, then remove it.
  • Stuck on an older Composer? The Heimdall plugin enforces a minimum package age and works on Composer 2.0 and later. Treat it as a bridge, not a replacement for upgrading.

The habits around the tools

Policies help, but in my view ordinary habits matter just as much.

Use the lock file properly. Commit composer.lock. Run composer install, never update, in CI and production. Review lock-file changes in pull requests the way you review code. A new transitive dependency deserves a question.

Check the JavaScript side. A Laravel app with Vite or other npm tooling is a JavaScript project too. It is exposed to npm worms and to package.json hooks inside Composer packages. Use npm ci, consider --ignore-scripts where your build allows it, and apply a minimum release age to npm as well.

Protect secrets. GitGuardian found more than 10,000 unique Laravel APP_KEYs on GitHub, confirmed 400 still worked, and found 4 production applications exposed to remote code execution. Never commit .env. Turn on secret scanning. If APP_KEY or any credential reaches a repository, rotate it. If a compromised package was ever installed, follow the advice of Singapore's Cyber Security Agency in its 2026 advisory on the Shai-Hulud family: treat every credential the affected machine could reach as potentially compromised, and rotate it.

Your own publishing pipeline

If your team publishes packages, internal or public, you are part of someone else's supply chain. The basics:

  • two-factor authentication on every GitHub account with publish rights
  • a review of GitHub Actions for pull_request_target triggers and shared caches
  • least-privilege, short-lived tokens
  • organisation-owned packages instead of shared company accounts

Don't rely on signing alone. One of the large npm worms of 2026 shipped malware with valid signed provenance, because the attackers abused the build pipeline itself.

AI coding agents

AI coding agents add a newer risk. Private Packagist warns that an agent may install a package "on a whim". The answer is to enforce Composer and npm policy centrally, on build machines or through a private repository, so no tool or agent can quietly bypass it. Review AI-generated code with the same care as a junior developer's, using the OWASP Top 10 as your baseline.

A realistic start for teams in Iraq and the Kurdistan Region

PHP and Laravel are the main web stack for many software houses and institutional IT teams here. The weak points I tend to notice are ordinary ones: old Docker or CI images that have not been rebuilt for a long time, and shared deployment accounts.

A one-day "dependency hygiene" sprint is a realistic first step. Rebuild your base images with a current Composer, add composer audit to CI, and move each package and deployment to named accounts with two-factor authentication.

Institutions that buy software can help too. When a contractor delivers a government or university system, ask for the composer.lock file, the composer audit output and the Composer version used. It costs the contractor almost nothing and tells you a lot.

If you would like an outside review of your build pipeline and hosting, my company, Standing, provides IT services, security and hosting, and can help with this kind of review.

Decision table and a 10-minute checklist

Setting Recommended value Why
Composer version 2.11 or later everywhere Below 2.10 there is no malware blocking; below 2.11 there is no cooldown
policy.malware.block true (never disabled project-wide) Blocks flagged versions, even ones already in the lock file
policy.cooldown.period 3–7 days Malicious versions are usually pulled or detected within hours
Cooldown exemptions Per package, short-lived Security patches should not wait
policy.advisories.block true Stops known-vulnerable versions being installed
CI install command composer install and npm ci Reproducible builds from reviewed lock files
composer audit Required CI step Reports advisories and flagged malware

10-minute checklist

  1. Run composer --version on laptops, CI images and build servers.
  2. Search repositories for malware blocking set to false.
  3. Add a cooldown globally on build machines.
  4. Turn on advisory blocking.
  5. Make composer audit a required CI step.
  6. Confirm composer.lock is committed and CI never runs update.
  7. Switch npm builds to npm ci and review install scripts.
  8. Confirm .env is in .gitignore and secret scanning is on.
  9. Check that publishing accounts use two-factor authentication.
  10. Write down who rotates credentials if a bad package is installed.

Composer now does much of the defensive work for you, but only if you run a current version and leave the protections switched on. Upgrade Composer everywhere this week, set a cooldown, and treat your lock file as code. That small effort closes many of the doors this year's attacks walked through.

Sources & further reading

  1. Semgrep: Malicious Intercom PHP Package Spreads Mini Shai-Hulud Attack to Packagist via Composer Pluginsemgrep.dev
  2. The Hacker News: Packagist Supply Chain Attack Infects 8 Packages Using GitHub-Hosted Linux Malwarethehackernews.com
  3. Packagist Blog: An update on Composer & Packagist supply chain securityblog.packagist.com
  4. Packagist Blog: Blocking malware downloads for every Composer version in Private Packagistblog.packagist.com
  5. Packagist Blog: Composer 2.10 Releaseblog.packagist.com
  6. GitGuardian: Exploiting Public APP_KEY Leaks to Achieve RCE in Hundreds of Laravel Applicationsblog.gitguardian.com

🤖 Researched and drafted with AI assistance, guided by my editorial standards. Spotted something wrong? Tell me.

Akam Omer
Written by

Akam Omer

IT leader, engineer and security specialist from Erbil with 20+ years across higher education, telecoms, healthcare and government. Founder of BulkSMSIraq, VerifyWay and Kurd.ai.