Skip to content
Fencer Vulns
medium 5.9

CVE-2018-16831 json

Smarty Path Traversal Vulnerability

published 2018-09-11 8 y ago modified 2026-06-17 4 mo ago also GHSA-65j5-vpm7-6xp4 , EUVD-2022-2716

cvss
5.9
version 3.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
2.7%
EPSS 2.7% chance of exploitation in 30 days, percentile 85%
public exploits
0
none known

Summary

Smarty before 3.1.33-dev-4 allows attackers to bypass the trusted_dir protection mechanism via a file:./../ substring in an include statement.

Patch / fix

  • packagist smarty/smarty 3.1.33
  • smarty3 Debian 14, Debian 13, Debian 12 3.1.33+20180830.1.3a78a21f+selfpack1-1

debian advisories DEBIAN-CVE-2018-16831

  • smarty3 Ubuntu 18.04 LTS 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1

ubuntu advisories UBUNTU-CVE-2018-16831

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2018-16831 updated cvss 8.8

php-Smarty: trusted_dir protection mechanism bypass

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

2.66% chance of exploitation in the next 30 days, higher than 85% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/smarty-php/smarty/issues/486 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.0 5.9 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
NVD 2.0 7.1 AV:N/AC:M/Au:N/C:C/I:N/A:N
GitHub 3.0 5.9 CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected packages

ecosystem package affected fixed in
packagist smarty/smarty
<3.1.33
3.1.33

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.