PatchClock

PHP security digest · 7 Oct 2026

The module Country provides a dedicated field type for Drupal core's official country list. The module does not sufficiently escape user input in its autocompl...

Unrated CVE-2026-107308

Package
drupal/country
Fixed in
2.1.3, 2.2.1
Published
Wed 7 Oct 2026, 17:36 LisbonUpdated Mon 26 Oct 2026, 04:26 Lisbon

In plain words

The Country module does not sufficiently escape user input in its autocomplete widget, which can allow an attacker to run script in a user's browser. This cannot happen with the Country module alone out of the box: additional modules or custom code are required.

Am I affected?

Look for drupal/country and its version in composer.lock. The advisory lists fixes in 2.1.3 and 2.2.1, but gives no affected version range. Check whether your project uses the Country autocomplete widget with additional modules or custom code; the advisory does not specify which modules or code make it vulnerable.

What to do

Check which version you have, then update to a fixed release for your branch (2.1.3, 2.2.1):

composer show drupal/country | grep versions
composer update drupal/country

If your version constraint in composer.json keeps you below a fixed release, raise it first. Whether your configuration is affected, and the exact version ranges, are in the advisory itself.

If you cannot update yet

The issue cannot occur with the Country module alone out of the box; additional modules or custom code are required.

The advisory's description

The module Country provides a dedicated field type for Drupal core's official country list.

The module does not sufficiently escape user input in its autocomplete widget, which can lead to a cross site scripting vulnerability.

This vulnerability is mitigated by the fact that it can not occur out of the box with the Country module, additional module(s) or custom code is required.

The advisory

From OSV.dev, which gathers the GitHub Advisory Database, FriendsOfPHP and Drupal security advisories; the summary is theirs. The description is OSV's record of the advisory. "In plain words", "Am I affected?" and "If you cannot update yet" are based on that advisory, and checked to name no version it does not.