CVE-2023-28447 Cross site scripting vulnerability in Javascript escaping in smarty/smarty

High 7.1 Published Updated

Attackers can execute arbitrary JavaScript in user browsers via improper escaping in the Smarty PHP template engine, potentially stealing data or hijacking sessions.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-28447?

CVE-2023-28447 is a high-severity cross-site scripting vulnerability in Fedoraproject Fedora, published on 28 Mar 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Smarty is a template engine for PHP. In affected versions smarty did not properly escape javascript code. An attacker could exploit this vulnerability to execute arbitrary JavaScript code in the context of the user's browser session. This may lead to unauthorized access to sensitive user data, manipulation of the web application's behavior, or unauthorized actions performed on behalf of the user. Users are advised to upgrade to either version 3.1.48 or to 4.3.1 to resolve this issue. There are no known workarounds for this vulnerability.

Weakness: CWE-79

Which versions are affected by CVE-2023-28447?

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

PackageAffectedFixed in
smarty/smarty PackagistAll versions3.1.48
smarty/smarty PackagistAll versions3.1.48
smarty/smarty PackagistFrom 4.0.04.3.1
smarty/smarty PackagistFrom 4.0.04.3.1

Products include Fedoraproject Fedora, Smarty Smarty.

How do I fix CVE-2023-28447?

Upgrade smarty/smarty to a fixed version for your release line: 3.1.48 or 4.3.1.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2023-28447 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

All Fedoraproject Fedora vulnerabilities

Sources

Also known as DEBIAN-CVE-2023-28447, GHSA-7j98-h7fp-4vwj, MGASA-2023-0155, UBUNTU-CVE-2023-28447, USN-8242-2, USN-8272-1.

Is CVE-2023-28447 in your software?

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

Check your SBOMs for free