p PatchFirst

CVE-2026-82531

CVE-2026-82531 · Smarty before 4.5.8 and 5.x before 5.8.5 PHP Code Injection via extends: Inheritance Cache

This page contains facts from public vulnerability sources. Check the original advisory before updating.

Smarty before 4.5.8 and 5.x before 5.8.5 contains a code injection vulnerability where the top-level nocache_hash is never restored during extends:/multi-component template inheritance, leaving it null. Attackers can supply assigned data containing a forged SmartyNocache marker that is copied verbatim into the regenerated PHP cache file, executing arbitrary PHP on include for remote code execution.

CVSS 9.2 · Critical · EPSS 0.8% · Public exploit · Fix available

Published
Updated

Stack: system

Affected products and versions

  • smarty

    Versions
    • ≥ 0, < 4.5.8: Affected (semver)
    • ≥ 5.0.0, < 5.8.5: Affected (semver)
    • 4.5.8: Not affected (semver)
    • 5.8.5: Not affected (semver)

    Update to 4.5.8; Update to 5.8.5

  • smarty3 Debian:12

    Versions
    • 3.1.47-2
    • 3.1.47-2+deb12u1
    • 3.1.48-1
    • 3.1.48-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty3 Debian:13

    Versions
    • 3.1.48-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty3 Debian:14

    Versions
    • 3.1.48-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty4 Debian:12

    Versions
    • 4.3.0-1
    • 4.3.0-1+deb12u1
    • 4.3.0-1+deb12u2
    • 4.3.1-1
    • 4.5.4-1
    • 4.5.5-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty4 Debian:13

    Versions
    • 4.5.5-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty4 Debian:14

    Versions
    • 4.5.5-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty3 Ubuntu:Pro:16.04:LTS

    Versions
    • 3.1.21-1
    • 3.1.21-1ubuntu1
    • 3.1.21-1ubuntu1+esm1
    • 3.1.21-1ubuntu1+esm2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty3 Ubuntu:Pro:18.04:LTS

    Versions
    • 3.1.31+20161214.1.c7d42e4+selfpack1-2
    • 3.1.31+20161214.1.c7d42e4+selfpack1-3
    • 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
    • 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty3 Ubuntu:Pro:20.04:LTS

    Versions
    • 3.1.33+20180830.1.3a78a21f+selfpack1-1
    • 3.1.34+20190228.1.c9f0de05+selfpack1-1
    • 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1
    • 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1
    • 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1+esm1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty3 Ubuntu:22.04:LTS

    Versions
    • 3.1.39-2
    • 3.1.39-2ubuntu1
    • 3.1.39-2ubuntu1.22.04.1
    • 3.1.39-2ubuntu1.22.04.2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty3 Ubuntu:24.04:LTS

    Versions
    • 3.1.48-1
    • 3.1.48-1ubuntu0.24.04.1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty4 Ubuntu:24.04:LTS

    Versions
    • 4.3.1-1
    • 4.3.1-1ubuntu0.24.04.1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty3 Ubuntu:26.10

    Versions
    • 3.1.48-2build1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty4 Ubuntu:26.10

    Versions
    • 4.5.5-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty3 Ubuntu:26.04:LTS

    Versions
    • 3.1.48-2
    • 3.1.48-2build1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • smarty4 Ubuntu:26.04:LTS

    Versions
    • 4.5.5-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →