CVE-2023-51445 GeoServer Stored Cross-Site Scripting (XSS) vulnerability in REST Resources API

Medium 4.8 Published Updated

An authenticated administrator can inject JavaScript into style resources, leading to code execution in another administrator's browser via the REST API.

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

What is CVE-2023-51445?

CVE-2023-51445 is a medium-severity cross-site scripting vulnerability in geoserver, published on 20 Mar 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

Official description

GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. A stored cross-site scripting (XSS) vulnerability exists in versions prior to 2.23.3 and 2.24.0 that enables an authenticated administrator with workspace-level privileges to store a JavaScript payload in uploaded style/legend resources that will execute in the context of another administrator's browser when viewed in the REST Resources API. Access to the REST Resources API is limited to full administrators by default and granting non-administrators access to this endpoint should be carefully considered as it may allow access to files containing sensitive information. Versions 2.23.3 and 2.24.0 contain a patch for this issue.

Weakness: CWE-79

Which versions are affected by CVE-2023-51445?

2 open source packages ship an affected version, including org.geoserver:gs-restconfig. It affects 1 product.

PackageAffectedFixed in
org.geoserver:gs-restconfig MavenAll versions2.23.3
org.geoserver:gs-restconfig MavenAll versions2.23.3

Products include Geoserver Geoserver.

How do I fix CVE-2023-51445?

Upgrade org.geoserver:gs-restconfig to 2.23.3 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-2023-51445 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-51445 exists.

Sources

Also known as GHSA-fh7p-5f6g-vj2w.

Is CVE-2023-51445 in your software?

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

Check your SBOMs for free