CVE-2024-23821 GeoServer's GWC Demos Page vulnerable to Stored Cross-Site Scripting (XSS)

Medium 4.8 Published Updated

An authenticated administrator can inject JavaScript into GeoServer's catalog, leading to stored XSS execution in other users' browsers via the GWC Demos Page.

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

CVE-2024-23821 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.4 and 2.24.1 that enables an authenticated administrator with workspace-level privileges to store a JavaScript payload in the GeoServer catalog that will execute in the context of another user's browser when viewed in the GWC Demos Page. Access to the GWC Demos Page is available to all users although data security may limit users' ability to trigger the XSS. Versions 2.23.4 and 2.24.1 contain a patch for this issue.

Weakness: CWE-79

Which versions are affected by CVE-2024-23821?

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

PackageAffectedFixed in
org.geoserver:gs-gwc MavenAll versions2.23.4
org.geoserver:gs-gwc MavenAll versions2.23.4
org.geoserver:gs-gwc MavenFrom 2.24.02.24.1
org.geoserver:gs-gwc MavenFrom 2.24.02.24.1

Products include Geoserver Geoserver.

How do I fix CVE-2024-23821?

Upgrade org.geoserver:gs-gwc to a fixed version for your release line: 2.23.4 or 2.24.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-2024-23821 being exploited?

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

Sources

Also known as GHSA-88wc-fcj9-q3r9.

Is CVE-2024-23821 in your software?

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

Check your SBOMs for free