CVE-2026-108981
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.)
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libnginx-mod-http-cache-purge | Fix pending | UBUNTU-CVE-2026-108981 | |
| Ubuntu 26.04 | libnginx-mod-http-cache-purge | Under investigation | UBUNTU-CVE-2026-108981 | |
| Ubuntu 24.04 | libnginx-mod-http-cache-purge | Under investigation | UBUNTU-CVE-2026-108981 | |
| Debian 14 | libnginx-mod-http-cache-purge | Fixed | 1:3.0.4-1 | DEBIAN-CVE-2026-108981 |
| Debian 13 | libnginx-mod-http-cache-purge | Fix pending | DEBIAN-CVE-2026-108981 | |
| Debian 12 | libnginx-mod-http-cache-purge | Fix pending | DEBIAN-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.
- denji ngx_cache_purge: affected: 2.4.0 to 2.5.6, 3.0.0 to before 3.0.4; fixed in
3.0.4
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:
- https://github.com/nginx-modules/ngx_cache_purge/pull/72 (patch)
- https://github.com/nginx-modules/ngx_cache_purge/commit/a6da1352f52a8a02dd6828e88c39ed42f… (patch)
References
- https://github.com/nginx-modules/ngx_cache_purge/pull/72
- https://github.com/nginx-modules/ngx_cache_purge/commit/a6da1352f52a8a02dd6828e88c39ed42fddcee96
- https://github.com/nginx-modules/ngx_cache_purge/releases/tag/3.0.4
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.