Skip to content
Heist/ feed
Back to feed
Critical

smarty3, smarty4 — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-82531

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.

Products
smarty3, smarty4
Affected versions
3.1.21-1, 3.1.21-1ubuntu1, 3.1.21-1ubuntu1+esm1, 3.1.21-1ubuntu1+esm2, 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, 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, 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1+esm1, 3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1, 3.1.39-2, 3.1.39-2ubuntu1, 3.1.39-2ubuntu1.22.04.1, 3.1.39-2ubuntu1.22.04.2, 3.1.48-1, 3.1.48-1ubuntu0.24.04.1, 3.1.48-2, 3.1.48-2build1, 4.3.1-1, 4.3.1-1ubuntu0.24.04.1, 4.5.5-1
Fixed versions
Not specified
CVEs
CVE-2026-82531
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 03:21 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-82531

core-osv · Original source

Published 6 Oct 2026, 13:16 UTC

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.

osv:UBUNTU-CVE-2026-82531

smarty3

Fixed versions: Not specified

smarty3

Fixed versions: Not specified

smarty3

Fixed versions: Not specified

smarty3

Fixed versions: Not specified

smarty3

Fixed versions: Not specified

smarty4

Fixed versions: Not specified

smarty3

Fixed versions: Not specified

smarty4

Fixed versions: Not specified

smarty3

Fixed versions: Not specified

smarty4

Fixed versions: Not specified

Complete source record
{
  "id": "feb0c9a33a4f0114153c8c8419325b9eace1e38196be693f2e3ec76fbc65a01f",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-82531",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-82531",
    "summary": "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.",
    "evidence": "osv:UBUNTU-CVE-2026-82531",
    "products": [
      {
        "name": {
          "value": "smarty3",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.21-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.1.21-1ubuntu1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.1.21-1ubuntu1+esm1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "3.1.21-1ubuntu1+esm2",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "smarty3",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.31+20161214.1.c7d42e4+selfpack1-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "3.1.31+20161214.1.c7d42e4+selfpack1-3",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "smarty3",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.33+20180830.1.3a78a21f+selfpack1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "3.1.34+20190228.1.c9f0de05+selfpack1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1~esm1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1+esm1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "smarty3",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.39-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "3.1.39-2ubuntu1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "3.1.39-2ubuntu1.22.04.1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "3.1.39-2ubuntu1.22.04.2",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "smarty3",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.48-1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "3.1.48-1ubuntu0.24.04.1",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "smarty4",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.3.1-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "4.3.1-1ubuntu0.24.04.1",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "smarty3",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.48-2build1",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "smarty4",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.5.5-1",
            "evidence": "/affected/7/versions"
          }
        ]
      },
      {
        "name": {
          "value": "smarty3",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "3.1.48-2",
            "evidence": "/affected/8/versions"
          },
          {
            "value": "3.1.48-2build1",
            "evidence": "/affected/8/versions"
          }
        ]
      },
      {
        "name": {
          "value": "smarty4",
          "evidence": "/affected/9/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "4.5.5-1",
            "evidence": "/affected/9/versions"
          }
        ]
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "UBUNTU-CVE-2026-82531",
      "aliases": [
        "UBUNTU-CVE-2026-82531"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
        },
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty3",
            "purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=esm-apps%2Fxenial",
            "ecosystem": "Ubuntu:Pro:16.04:LTS"
          },
          "versions": [
            "3.1.21-1",
            "3.1.21-1ubuntu1",
            "3.1.21-1ubuntu1+esm1",
            "3.1.21-1ubuntu1+esm2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty3",
                "binary_version": "3.1.21-1ubuntu1+esm2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty3",
            "purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=esm-apps%2Fbionic",
            "ecosystem": "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"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty3",
                "binary_version": "3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1+esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty3",
            "purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=esm-apps%2Ffocal",
            "ecosystem": "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"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty3",
                "binary_version": "3.1.34+20190228.1.c9f0de05+selfpack1-1ubuntu0.1+esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty3",
            "purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=jammy",
            "ecosystem": "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"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty3",
                "binary_version": "3.1.39-2ubuntu1.22.04.2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty3",
            "purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "3.1.48-1",
            "3.1.48-1ubuntu0.24.04.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty3",
                "binary_version": "3.1.48-1ubuntu0.24.04.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty4",
            "purl": "pkg:deb/ubuntu/smarty4?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "4.3.1-1",
            "4.3.1-1ubuntu0.24.04.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty4",
                "binary_version": "4.3.1-1ubuntu0.24.04.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty3",
            "purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "3.1.48-2build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty3",
                "binary_version": "3.1.48-2build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty4",
            "purl": "pkg:deb/ubuntu/smarty4?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "4.5.5-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty4",
                "binary_version": "4.5.5-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty3",
            "purl": "pkg:deb/ubuntu/smarty3?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "3.1.48-2",
            "3.1.48-2build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty3",
                "binary_version": "3.1.48-2build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "smarty4",
            "purl": "pkg:deb/ubuntu/smarty4?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "4.5.5-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-82531.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "smarty4",
                "binary_version": "4.5.5-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T13:01:12.158157098Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-82531"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-82531",
        "https://www.cve.org/CVERecord?id=CVE-2026-82531",
        "https://github.com/smarty-php/smarty/security/advisories/GHSA-3w63-v7pm-cq9x"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-82531",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 361215,
  "published_at": "2026-10-06T13:16:00+00:00"
}