CVE-2018-13982 json
Smarty Path Traversal Vulnerability
published 8y ago modified 4mo ago also GHSA-7gfx-wxfh-7rvm , EUVD-2022-2995
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.5%
- EPSS 3.5% chance of exploitation in 30 days, percentile 89%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- packagist smarty/smarty 3.1.33
- 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-13982
- smarty3 Ubuntu 18.04 LTS 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
ubuntu advisories UBUNTU-CVE-2018-13982
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
Is CVE-2018-13982 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor 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-13982 updated cvss 6.2
php-smarty: Path traversal vulnerability in Smarty_Security::isTrustedResourceDir()
-
Red Hat All currently supported Red Hat productsnot 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
3.46% chance of exploitation in the next 30 days, higher than 89% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- github.com https://github.com/sbaresearch/advisories/tree/public/2018/SBA-ADV-20180420-01_Smarty_Path_Traversal referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/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
-
github.com
/smarty-php/smarty/commit/2e081a51b1effddb23f87952959139ac62654d50
web, patch, vendor-advisory
-
github.com
/smarty-php/smarty/commit/f9ca3c63d1250bb56b2bda609dcc9dd81f0065f8
web, patch, vendor-advisory
-
github.com
/smarty-php/smarty/commit/c9dbe1d08c081912d02bd851d1d1b6388f6133d1
web, patch, vendor-advisory
-
github.com
/smarty-php/smarty/commit/8d21f38dc35c4cd6b31c2f23fc9b8e5adbc56dfe
web, patch, vendor-advisory
-
github.com
/smarty-php/smarty/commit/bcedfd6b58bed4a7366336979ebaa5a240581531
web, patch, vendor-advisory
-
github.com
/sbaresearch/advisories/tree/public/2018/SBA-ADV-20180420-01_Smarty_Path_Traversal
web, exploit, patch, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2021/04/msg00004.html
mailing-list, web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2021/04/msg00014.html
mailing-list, web, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2021/10/msg00015.html
mailing-list, web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2018-13982
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/smarty/smarty/CVE-2018-13982.yaml
web
-
github.com
/smarty-php/smarty
package
Sources
- CVE List CVE-2018-13982
- GitHub Advisory GHSA-7gfx-wxfh-7rvm
- NVD CVE-2018-13982
Fencer Intel 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.