Skip to content
Maintenance & updates

Composer blocks the update: resolving the security block

Composer blocks the update over a security advisory? How to read the message, find the dependency path, move to the patched version and set dated exceptions.

17 min read ComposerShopwareSicherheitsupdatesUpdates

In short and in plain language

Composer is a tool. It loads the parts a shop is built from. Some parts have a known flaw. Then Composer does not load that version in an update. The update stops with a message.

The message names the part and an ID for the flaw. First you look for a new version without the flaw. You put it in and test the shop.

If there is no good version yet, you can add an exception. It needs a reason. It also needs a date when it ends. The exception also goes in the report.

Turning the guard off for good is not a good idea. Then new flaws can get into the shop later with no stop.

The maintenance run starts as usual: pull a staging copy, run composer update, read the changes. This time Composer stops before a single file has changed. The terminal says the requirements could not be resolved to an installable set of packages, followed by an ID such as PKSA, GHSA or CVE and a note that matching versions are affected by security advisories. This is not a bug but intended behavior: since Composer 2.9, updates block package versions with known security advisories by default (Composer changelog). The official guides for Shopware, TYPO3 and Drupal install these systems through Composer, so the block hits their maintenance directly. Composer 2.10 moved the setting into a new configuration block called policy (Composer changelog), and Composer 2.11 explains blocked versions in more detail in its error messages (Composer changelog). This article shows how to read the message, find the affected package and its dependency path, move to a patched version first and set an exception only individually, with a reason and a time limit. It explains why the block should not be switched off globally, how the old keys block-insecure and block-abandoned carry over into the new configuration and what belongs in the maintenance log after such a run.

Key takeaways

  • Since Composer 2.9, composer update blocks versions with known security advisories by default (Composer changelog). composer install from an existing lock file still installs them (Packagist blog): the block hits the maintenance run, not the deploy.
  • The message names the package, the blocked versions and the advisory ID. composer why -t shows the dependency path, composer why-not the package that prevents the patched version (Composer documentation).
  • The first route is the patched version: composer update vendor/package -w updates the package together with its dependencies. If the fix only exists in a new major version, the update goes through staging and regression tests.
  • An exception goes individually under policy.advisories.ignore-id, with a reason. Composer has no expiry date, so the date goes into the reason and the maintenance log and is checked in every run.
  • "policy": false, --no-blocking and COMPOSER_NO_BLOCKING lift all blocks (Composer documentation), since Composer 2.10 including the one against reported malware (Composer changelog). The legacy keys only act as a fallback.
  • The lock file and composer audit --locked belong in every maintenance report. Since Composer 2.10 the audit ends with exit code 1 as soon as anything fails the check, otherwise with 0 (Composer changelog).

What has changed in updates since Composer 2.9

On composer update, Composer resolves the version ranges from composer.json again and writes the result to composer.lock. Since version 2.9, it removes package versions with known security advisories from the candidates before resolution starts. The changelog of the pre-release from November 7, 2025 introduces the block-insecure setting for this and notes that it is enabled by default (Composer changelog). The announcement of the final version describes the block as protection against accidentally updating to a vulnerable version (Packagist blog).

The advisories come from databases that the repository provides. By default, composer audit queries the Packagist.org API, and other repositories listed in composer.json can supply their own advisories (Composer documentation). Packagist names the source of each advisory, for example the GitHub security database or the FriendsOfPHP/security-advisories collection (Packagist API documentation). The size of the pool Composer filters is shown by the figures for the Packagist.org anniversary: more than 469,000 packages with over 5.8 million versions and more than 200 billion installs (Packagist blog).

In operations, the line between update and install matters. Versions with security advisories are blocked during updates and fail the audit, but they can still be installed (Packagist blog). A deploy that runs composer install to apply exactly the state in composer.lock keeps working, even if an advisory has since been published for a package pinned there. The block applies where new versions are selected: on composer update, composer require and composer remove. Versions reported as malware are a different case. Since version 2.10, Composer blocks them by default during install as well (Composer changelog).

Shopware projects today start from the project template, a Composer project that installs Shopware itself as a dependency (Shopware documentation). TYPO3 is set up with composer create-project in the official introduction (TYPO3 documentation), and Drupal can be managed through Composer together with modules, themes and libraries (Drupal documentation). For Shopware maintenance as well as TYPO3 maintenance this means: the block can show up in any update run, and it belongs in the planned process, not under incidents.

Reading the message line by line

If Composer cannot resolve an update because of a security advisory, the run ends with the line saying the requirements could not be resolved to an installable set of packages. The individual problems follow below. In Composer 2.11 the decisive part looks like this, shown here with placeholders instead of real package names:

composer update, output (placeholders)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires vendor/package ^X.Y, found
      vendor/package[X.Y.0, X.Y.1] but these were not loaded,
      because they are affected by security advisories
      ("PKSA-xxxx-xxxx-xxxx"). Go to https://packagist.org/security-advisories/
      to find advisory details. To ignore the advisories, add their IDs
      to the "policy.advisories.ignore-id" config or add the package to
      "policy.advisories.ignore". To turn the feature off entirely,
      you can set "policy.advisories.block" to false.

Four parts of the message carry the information needed for the decision:

  • Root composer.json requires: the package is listed directly in your composer.json. If the line names another package that requires it instead, it is an indirect dependency.
  • The version list in square brackets: these are the versions that match the required range and were blocked. If no unblocked version remains in the range, resolution fails.
  • The ID: PKSA stands for Packagist, GHSA for the GitHub security database, CVE for the general vulnerability identifier. Composer accepts all three in exceptions (Composer documentation).
  • The two ways out at the end: exception or switching off. Composer lists them because they are technically possible. That is not a recommendation.

Composer 2.11 reworked exactly this explanation. The changelog of the pre-release from October 22, 2026 lists improved explanations for versions blocked by security advisories in dependency conflict errors (Composer changelog); the final version 2.11.0 followed on October 29, 2026 (Composer changelog). Older versions are terser: Composer 2.9 still points to the ignore and block-insecure settings under audit in the same message (Composer source code). If you see a message with audit keys, you are working with an older Composer version. composer --version shows which one was active in the run and therefore belongs in the maintenance report.

Finding the affected package and the dependency path

Before anything changes, record the current state. composer audit --locked checks the packages from composer.lock, regardless of what is currently in the vendor directory (Composer documentation). For each advisory, the output lists package, severity, advisory ID, CVE, title, link, affected versions and the reporting date (Composer source code). Since Composer 2.11, the --direct option limits the audit to packages listed directly in composer.json (Composer changelog). For tracing the cause, the full run is usually more useful, because advisories often sit deep in the dependency tree.

Next comes the path. composer why vendor/package -t shows as a tree which packages require the affected package and with which version range (Composer documentation). This is where the route to a solution is decided: if the package is in your own composer.json, the fix is in your hands. If it comes in through an extension, a theme or the shop core, their version range determines whether the patched version can be reached at all.

The cross-check is composer why-not vendor/package X.Y.Z with the version that contains the fix. The command lists the packages that prevent exactly this version (Composer documentation). Typical results in shop operations: an extension pins a library to an old major version, the shop core requires a PHP version the server does not offer yet, or the fix only ships in a version that needs a newer major version of the framework. In the last case, the solution depends on a larger update that needs planning of its own.

  • package name, installed version and advisory ID
  • direct or indirect dependency, with the path from composer why
  • first version with a fix according to the advisory and whether it fits the version range
  • whether the affected feature is used in the shop at all
  • severity and whether the vulnerability can be reached from outside without logging in

Privately sourced extensions deserve a second look. For packages that do not come from Packagist.org, coverage depends on whether the queried sources list advisories for them. The block therefore does not replace following the vendors' security notices, which CVE management covers anyway.

First route: moving to the patched version

The first look goes to the advisory itself. It names the affected version ranges, and these show from which version on the problem is fixed. If a package follows Semantic Versioning, a security fix ideally ships in a patch version, that is, a backward compatible bug fix (Semantic Versioning). Then a targeted update is enough: composer update vendor/package --with-dependencies updates the package together with its dependencies but leaves out packages that are root requirements; -W includes those as well (Composer documentation).

If the patched version does not fit the range of an extension, forcing the library does not help. The clean route is to update the extension that sets the range in the same run. For trying things out without changing composer.json, --with adds a temporary version constraint for a single run, now also with wildcards for an entire vendor namespace (Packagist blog). With --dry-run, Composer shows in advance what it would do without changing anything (Composer documentation). After the update, running composer audit --locked again shows whether the advisory is gone.

If the fix only exists in a new major version, this is no longer a security update but a version change. Then the procedure for larger updates applies: apply it in a staging environment, check the critical paths such as cart and checkout with update tests and only then go live. Until then, a time-boxed exception is often the sensible bridge, provided the vulnerability cannot be exploited in your own shop or can be contained otherwise.

A way out that is not one: switching to a development branch. Composer matches advisories against version numbers and therefore does not block branches such as dev-main (Composer documentation). Anyone who bypasses the block this way loses the release state and will later struggle to tell which code is running in the shop.

Second route: the exception with reason and expiry date

Sometimes the update is not possible or not necessary within the maintenance window. The vulnerability affects a feature the shop does not use, the fix has been applied as a patch of your own, or the patched version requires a version change that has to be tested first. Composer provides exceptions for this case. Since Composer 2.10, the right place is the policy.advisories.ignore-id key: a list of IDs such as CVE, GHSA or PKSA, optionally with a reason per entry (Composer documentation).

composer.json (excerpt, placeholders)
{
  "config": {
    "policy": {
      "advisories": {
        "ignore-id": {
          "PKSA-xxxx-xxxx-xxxx": "Feature not in use, checked on YYYY-MM-DD (ticket M-xxx). Expires YYYY-MM-DD, then update to the patched version."
        }
      }
    }
  }
}

Composer has no expiry date for exceptions. The date therefore goes into the reason text and the maintenance log, and every maintenance run checks whether it has passed. In our experience, an exception without a date stays in place until nobody remembers why it was set.

Three rules keep the exception small. First: per ID, not per package. Composer also allows exceptions by package name, including wildcards, under policy.advisories.ignore (Composer documentation), but such a rule silently swallows every future advisory for the same package. Second: no exception by severity. The ignore-severity list knows four levels, low, medium, high and critical (Composer documentation). The rating scale of the CVSS specification uses the same names, with a score of 9.0 to 10.0 counting as critical (FIRST). The specification sees the levels as an aid for prioritization; whether a vulnerability can be reached in your own shop is not something the level tells you. Third: the exception stays visible. An ID under ignore-id unblocks the update, and composer audit keeps listing the advisory as ignored, together with the stored reason (Composer source code).

For special cases there are the on-block and on-audit switches, which make an exception apply only to the block or only to the audit. According to the Composer source code, a rule with "on-audit": false unblocks the update and keeps the advisory in the audit as an open finding (Composer source code). The documentation describes the switches the other way round in the ignore-id section, but in line with the source code in the section on the ignore format (Composer documentation). If you use them, verify the effect with a trial run of composer audit and composer update --dry-run before relying on it.

Since Composer 2.11, every change to an exception has a consequence for the lock file: when the policy configuration changes, composer.lock counts as outdated and Composer warns (Composer changelog). composer update --lock writes the new hash without changing package versions (Composer documentation). The exception and the updated composer.lock therefore belong in the same commit.

Third route: when there is no fix

If the advisory names no patched version, the next question goes to the vendor: for extensions to the plugin vendor, for libraries to the project behind the package. The request includes the advisory ID, the installed version and the dependency path and asks for a date for the fix. The answer determines the next step.

  • Fix announced: time-boxed exception until the stated date, follow-up in the maintenance plan, update promptly once it is released.
  • Fix only in a new major version: plan the version change and keep the exception with an expiry date until then.
  • No fix, no answer: replace the package or remove the feature. How to approach this for extensions is described in the article on abandoned plugins.
  • Vulnerability exploitable, no fix in sight: switch off the affected feature or block access to it until a solution is in place.

A patch of your own that backports the fix from a newer branch is possible but costly: it has to be checked again with every subsequent update. It is a bridge, not a permanent state, and it belongs together with an exception under ignore-id whose reason refers to the patch. The order matters: first the decision with a reason, then the entry in composer.json.

Why the block is not switched off

The error message ends with a note on how to switch the feature off entirely. There are several ways to do that: set policy.advisories.block to false, set the whole policy block to false, run the update with --no-blocking or set the COMPOSER_NO_BLOCKING environment variable in the pipeline (Composer documentation). Each of them solves the problem of the day and at the same time lets through everything that comes after.

SwitchEffectConsequence in shop operations
policy.advisories.block set to falseno more block for versions with security advisoriesany future vulnerable version can slip into the update
policy set to falseturns off all policies, including the audit verdictthe block against reported malware is gone as well
option --no-blockinglifts all blocks for one runthe run takes whatever the version range allows, unchecked
variable COMPOSER_NO_BLOCKINGlike --no-blocking, but for every run in that environmenteasily stays unnoticed in CI settings
ignore-id with reasonunblocks exactly one advisoryall other blocks remain active

The environment variable is particularly treacherous. A COMPOSER_NO_BLOCKING=1 that someone added to the pipeline during an emergency keeps working in every following run, and nothing of it shows in composer.json. Checking the variables of the build environment is therefore part of every project takeover. The Packagist team itself calls "policy": false the kill switch that disables all policies at once (Packagist blog).

On top of that, since Composer 2.10 policy covers more than security advisories: the rules against reported malware live in the same block (Composer changelog), and Composer 2.11 added an optional waiting period for freshly published versions (Composer changelog). How this waiting period helps against supply chain attacks is covered in the article on supply chain attacks. What matters here: anyone who switches off the whole block loses all protective layers at once.

The legacy keys block-insecure and block-abandoned

Many projects still carry settings from Composer 2.9. Back then, the keys block-insecure, enabled by default, and block-abandoned, disabled by default, were added under config.audit (Composer changelog). With Composer 2.10, the policy block replaced most of the audit settings and deprecated them (Composer changelog). The documentation points to config.policy but keeps reading the old keys for backward compatibility (Composer documentation).

The migration is one-to-one, for example block-insecure to policy.advisories.block and ignore-severity to policy.advisories.ignore-severity (Packagist blog). There is a trap in the transition: the old keys only apply as a fallback while the matching section under policy is missing, and it is all or nothing. Setting policy.advisories, even with a single value, turns off all security-related entries under audit, including audit.ignore and audit.ignore-severity (Composer documentation). A half-finished migration thus turns an old exception back into a block. Conversely, an old switch-off value under audit keeps working as long as policy.advisories is missing.

Previously under auditNow under policyDefault
block-insecureadvisories.blocktrue, blocks
ignore (IDs)advisories.ignore-idempty
ignore (package names)advisories.ignoreempty
ignore-severityadvisories.ignore-severityempty
block-abandonedabandoned.blockfalse, does not block
abandonedabandoned.auditfail

The block for abandoned packages stays off by default, while the audit still reports such packages (Packagist blog). Whether a project turns it on is a question of the maintenance status of its extensions, which the article on abandoned plugins covers.

Lock file and audit in the maintenance log

composer.lock is the most precise record of a shop: it states which version of every package is installed. Composer recommends committing it to version control so that development, CI and production use the same versions (Composer documentation), and the Shopware project template provides for exactly that (Shopware documentation). For maintenance this means: every run ends with a commit that contains the changed composer.lock, and the report refers to that commit.

Alongside it, the audit belongs in the report, in machine-readable form. composer audit --locked --format=json returns the state of composer.lock as JSON and lists ignored advisories in a separate field (Composer source code). Since Composer 2.10, the audit ends with exit code 0 when the check passes and with 1 as soon as anything fails it (Composer changelog). That makes it usable as a gate in the pipeline: a finding stops the build instead of just leaving a line in the log. The summary Composer prints at the end of update and require (Composer documentation) is not enough for the report, because it disappears with the terminal.

  • Composer version of the run, printed with composer --version
  • commit with the new composer.lock and a list of the changed packages
  • result of composer audit --locked --format=json as a file, with the exit code
  • every exception with ID, reason, expiry date and the person responsible
  • open advisories without a fix, with the date of the request to the vendor
  • date of the next follow-up

A report like this answers the questions asked after an incident: since when was the vulnerability known, who decided, and why was the shop on this state at that time? How this fits into a plannable process with fixed maintenance windows is also shown in the Shopware update strategy.

What maintenance takes over when an update is blocked

A security block in an update is no reason to rush, but it is a reason for a decision, and that decision should be made by someone who knows the shop, its extensions and its supply chain. In our Shopware maintenance it is part of every update run. For Drupal, the same procedure applies in Drupal maintenance, for TYPO3 in TYPO3 maintenance.

Evaluate the block

Document the message, advisory ID and dependency path, assess severity and reachability in the shop, record the decision.

Apply the patched version

Targeted update on staging, tests of the critical paths, sign-off and a commit with the new composer.lock.

Manage exceptions

Single exception with reason and expiry date, follow-up in every run, contact with the vendor until the fix is out.

How quickly we respond within service hours and how we report is set out in the SLA maintenance contract. Critical vulnerabilities outside the plan go through emergency support, ongoing care through security updates. The services page gives an overview of all services, and for a first assessment of your project, a message through the contact form is enough.

Sources

This article is based on data from: Composer changelog for versions 2.9.0-RC1, 2.10.0-RC2, 2.10.0, 2.11.0-RC1 and 2.11.0 (getcomposer.org); Composer documentation, sections Config, Command-line interface and Basic usage; Composer source code on GitHub (classes for policies, audit and error messages); Packagist blog, announcements of Composer 2.9, 2.10 and 2.11 and the Packagist.org anniversary post; Packagist API documentation; Shopware documentation, installation; TYPO3 documentation, installation; Drupal documentation, Using Composer to Install Drupal and Manage Dependencies; FIRST, Common Vulnerability Scoring System 4.0; Semantic Versioning 2.0.0. All sources accessed on October 30, 2026.

Related Articles

Security

Debug Mode in Production: Checking Profiler and Error Pages

After a hotfix, debug mode often stays on. What strangers see on error pages and in the profiler, and how to check Shopware and WordPress after each change.

19 min read
Monitoring & incident response

Shopware system check: what system:check reports and misses

Shopware ships its own system check, system:check. What its exit codes, contexts and HTTP endpoint report, what it cannot see and how to evaluate it safely.

19 min read
Maintenance & updates

Node.js in the shop build: 20 is out, 22 ends in 2027

Shopware 6.7 lists Node.js 20 as its minimum, yet that line lost support in April 2026. Where Node sits in the shop build and how to move to 24 safely.

18 min read