CVEfocus › CVE database › CVE-2026-108981

CVE-2026-108981

CVSS 3.6 LowEPSS 0.1% (higher than 2% of CVEs)Published 2026-10-12Updated 2026-10-14Assigner: mitre

ngx_cache_purge before 3.0.4 can allow file deletion via a symlink attack in certain situations where nginx and a served application (e.g., WordPress) run under the same user account. The attacker must be able to create a symlink inside the cache path. Version 3.0.4 fixes this for the case of a symlink created at an arbitrary earlier time, but does not resolve an applicable TOCTOU race condition. (The ngx_cache_purge module follows symlinks while walking the cache directory tree during purge operations. The module relies on nginx's ngx_walk_tree(), which relies on stat() and therefore follows symlinks.)

CWE-61

What to do

Fixed builds are available from Debian: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
3Fix pending
2Under investigation

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10libnginx-mod-http-cache-purgeFix pendingUBUNTU-CVE-2026-108981
Ubuntu 26.04libnginx-mod-http-cache-purgeUnder investigationUBUNTU-CVE-2026-108981
Ubuntu 24.04libnginx-mod-http-cache-purgeUnder investigationUBUNTU-CVE-2026-108981
Debian 14libnginx-mod-http-cache-purgeFixed1:3.0.4-1DEBIAN-CVE-2026-108981
Debian 13libnginx-mod-http-cache-purgeFix pendingDEBIAN-CVE-2026-108981
Debian 12libnginx-mod-http-cache-purgeFix pendingDEBIAN-CVE-2026-108981

What the vendor says

As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: Fixed in commit a6da135 (PR #72) on the releases/stable-3.0 branch. 2.4 through 2.5.6 users should upgrade to 3.x, or backport the change to the two ngx_walk_tree() call sites in those versions.

Workaround: Restrict write access to the cache directories and all of their parent directories to the nginx user only, and do not run nginx and untrusted application code (for example PHP-FPM) as the same user. Remove any symbolic links found inside configured cache paths (find <cache_path> -type l). These measures also limit the similar traversal in nginx's own cache loader, which the fix in the module does not change.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.