Skip to main content
No exploitation reportedFix available

CVE-2018-13982

No exploitation reported by the sources we read.

  • Published2018-09-18
  • WeaknessCWE-22

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

Smarty_Security::isTrustedResourceDir() in Smarty before 3.1.33 is prone to a path traversal vulnerability due to insufficient template code sanitization. This allows attackers controlling the executed template code to bypass the trusted directory security restriction and read arbitrary files.

Timeline

dates in UTC
  1. 2018-09-1821:29CVE publishedNVD

Versions per branch

NVD · OSV
Debian debian linux
BranchAffectedFixed in
9.0= 9.0no fix published
Smarty
BranchAffectedFixed in
3.1< 3.1.333.1.33

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • php-smartyMageia:8all versions · fixed in 4.0.4-1.mga8
  • php-smartyMageia:6all versions · fixed in 3.1.33-1.2.mga6
  • smarty3Ubuntu:18.04:LTSall versions · fixed in 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
  • smarty3Debian:14all versions · fixed in 3.1.33+20180830.1.3a78a21f+selfpack1-1
  • smarty3Debian:13all versions · fixed in 3.1.33+20180830.1.3a78a21f+selfpack1-1
  • smarty3Debian:12all versions · fixed in 3.1.33+20180830.1.3a78a21f+selfpack1-1
  • smarty3Debian:9all versions · fixed in 3.1.31+20161214.1.c7d42e4+selfpack1-2+deb9u2

Vendor advisories

  • CVE-2018-13982 Red Hat Product Security

    php-smarty: Path traversal vulnerability in Smarty_Security::isTrustedResourceDir()

Full record on NVD

Fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Published
2018-09-18
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-7gfx-wxfh-7rvm

Frequently asked questions

What is CVE-2018-13982?

Smarty_Security::isTrustedResourceDir() in Smarty before 3.1.33 is prone to a path traversal vulnerability due to insufficient template code sanitization. This allows attackers controlling the executed template code to bypass the trusted directory security restriction and read arbitrary files.

Is CVE-2018-13982 actively exploited?

Active exploitation of CVE-2018-13982 has not been confirmed. Its EPSS score was 3.5% on 2026-12-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2018-13982?

CVE-2018-13982 has a CVSS v3 base score of 7.5 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.

Running smarty/smarty? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record