# CVE-2018-13982

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2018-09-18 · Modified: 2024-08-05
- Aliases: MGASA-2018-0403, UBUNTU-CVE-2018-13982, DEBIAN-CVE-2018-13982
- Record: https://cvemate.com/vulnerability/CVE-2018-13982 · JSON: https://cvemate.com/vulnerability/CVE-2018-13982/json

## Description

```text
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.
```

## Signals

- CVSS: 7.5 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- EPSS: 3.463%, percentile 89.436%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- debian smarty3 (Debian): \< 3.1.33+20180830.1.3a78a21f+selfpack1-1
- ubuntu smarty3 (Ubuntu): \< 3.1.31+20161214.1.c7d42e4+selfpack1-3ubuntu0.1
- debian debian\_linux: 9.0
- mageia php-smarty (Mageia): \< 3.1.33-1.2.mga6
- smarty smarty: \< 3.1.33

## References

- <https://github.com/smarty-php/smarty/commit/2e081a51b1effddb23f87952959139ac62654d50>
- <https://github.com/smarty-php/smarty/commit/f9ca3c63d1250bb56b2bda609dcc9dd81f0065f8>
- <https://github.com/smarty-php/smarty/commit/c9dbe1d08c081912d02bd851d1d1b6388f6133d1>
- <https://github.com/smarty-php/smarty/commit/8d21f38dc35c4cd6b31c2f23fc9b8e5adbc56dfe>
- <https://github.com/smarty-php/smarty/commit/bcedfd6b58bed4a7366336979ebaa5a240581531>
- <https://github.com/sbaresearch/advisories/tree/public/2018/SBA-ADV-20180420-01_Smarty_Path_Traversal>
- <https://lists.debian.org/debian-lts-announce/2021/04/msg00004.html>
- <https://lists.debian.org/debian-lts-announce/2021/04/msg00014.html>
- <https://lists.debian.org/debian-lts-announce/2021/10/msg00015.html>
- <https://advisories.mageia.org/MGASA-2018-0403.html>
- <https://bugs.mageia.org/show_bug.cgi?id=23592>
- <https://www.openwall.com/lists/oss-security/2018/09/17/4>
- <https://ubuntu.com/security/CVE-2018-13982>
- <https://ubuntu.com/security/notices/USN-5348-1>
- <https://www.cve.org/CVERecord?id=CVE-2018-13982>
- <https://security-tracker.debian.org/tracker/CVE-2018-13982>

---

Data as of 2026-12-05T14:32:47.955Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
