CVE-2024-5312 Cross-Site Scripting vulnerability in PHP Server Monitor

Medium 6.3 Published Updated

An attacker can execute arbitrary scripts in a victim's browser via a crafted URL, potentially stealing session details in PHP Server Monitor.

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-2024-5312?

CVE-2024-5312 is a medium-severity cross-site scripting vulnerability in PHP Server Monitor, published on 24 May 2024. 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

PHP Server Monitor, version 3.2.0, is vulnerable to an XSS via the /phpservermon-3.2.0/vendor/phpmailer/phpmailer/test_script/index.php page in all visible parameters. An attacker could create a specially crafted URL, send it to a victim and retrieve their session details.

Weakness: CWE-79

Which versions are affected by CVE-2024-5312?

2 open source packages ship an affected version, including phpservermon/phpservermon.

PackageAffectedFixed in
phpservermon/phpservermon PackagistAll versions3.3.0
phpservermon/phpservermon PackagistAll versions3.3.0

How do I fix CVE-2024-5312?

Upgrade phpservermon/phpservermon to 3.3.0 or later.

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-2024-5312 being exploited?

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

Sources

Also known as GHSA-rq7f-j68f-mqh3.

Is CVE-2024-5312 in your software?

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

Check your SBOMs for free