CVE-2018-13982 Smarty Path Traversal Vulnerability

High 7.5 Published Updated

Attackers can bypass directory restrictions to read arbitrary files via path traversal in the Smarty template engine.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2018-13982?

CVE-2018-13982 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 18 Sep 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-22

Which versions are affected by CVE-2018-13982?

2 open source packages ship an affected version, including smarty/smarty. It affects 2 products.

PackageAffectedFixed in
smarty/smarty PackagistAll versions3.1.33
smarty/smarty PackagistAll versions3.1.33

Products include Debian Debian Linux, Smarty Smarty.

How do I fix CVE-2018-13982?

Upgrade smarty/smarty to 3.1.33 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2018-13982 being exploited?

There is no known exploitation of CVE-2018-13982 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2018-13982, GHSA-7gfx-wxfh-7rvm, MGASA-2018-0403, UBUNTU-CVE-2018-13982.

Is CVE-2018-13982 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free