CVE-2024-4201 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in GitLab

Medium 4.4 Published Updated

Attackers can execute arbitrary scripts in victim browsers by viewing specially crafted XML files in raw mode, potentially leading to account takeover.

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

What is CVE-2024-4201?

CVE-2024-4201 is a medium-severity cross-site scripting vulnerability in Gitlab Gitlab, published on 12 Jun 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

A cross-site scripting issue has been discovered in GitLab affecting all versions starting from 5.1 before 16.10.7, all versions starting from 16.11 before 16.111.4, all versions starting from 17.0 before 17.0.2. When viewing an XML file in a repository in raw mode, it can be made to render as HTML if viewed under specific circumstances.

Weakness: CWE-79

Which versions are affected by CVE-2024-4201?

1 open source package ship an affected version, including gitlab. It affects 1 product.

PackageAffectedFixed in
gitlab BitnamiFrom 5.1.016.10.7, 16.11.4, 17.0.2

Products include Gitlab Gitlab.

How do I fix CVE-2024-4201?

Upgrade gitlab to a fixed version for your release line: 16.10.7, 16.11.4 or 17.0.2.

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

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

All Gitlab Gitlab vulnerabilities

Sources

Also known as BIT-gitlab-2024-4201, GHSA-wq8m-964x-6vr4, UBUNTU-CVE-2024-4201.

Is CVE-2024-4201 in your software?

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

Check your SBOMs for free