CVE-2018-16831 Smarty Path Traversal Vulnerability

Medium 5.9 Published Updated

Attackers can bypass trusted directory restrictions in Smarty to read arbitrary files via path traversal in include statements.

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-16831?

CVE-2018-16831 is a medium-severity path traversal vulnerability in n/a, published on 11 Sep 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

Weakness: CWE-22

Which versions are affected by CVE-2018-16831?

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

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

Products include Smarty Smarty.

How do I fix CVE-2018-16831?

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-16831 being exploited?

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

Sources

Also known as DEBIAN-CVE-2018-16831, GHSA-65j5-vpm7-6xp4, UBUNTU-CVE-2018-16831.

Is CVE-2018-16831 in your software?

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

Check your SBOMs for free