CVE-2024-29191 GHSL-2023-205 gotortc DOM-based Cross-site Scripting vulnerability

Medium 6.1 Published Updated

An attacker can execute arbitrary JavaScript in the victim's browser via a crafted link in go2rtc, potentially leading to session hijacking or malicious actions.

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-29191?

CVE-2024-29191 is a medium-severity cross-site scripting vulnerability in AlexxIT go2rtc, published on 4 Apr 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

gotortc is a camera streaming application. Versions 1.8.5 and prior are vulnerable to DOM-based cross-site scripting. The links page (`links.html`) appends the `src` GET parameter (`[0]`) in all of its links for 1-click previews. The context in which `src` is being appended is `innerHTML` (`[1]`), which will insert the text as HTML. Commit 3b3d5b033aac3a019af64f83dec84f70ed2c8aba contains a patch for the issue.

Weakness: CWE-79

Which versions are affected by CVE-2024-29191?

3 open source packages ship an affected version, including github.com/AlexxIT/go2rtc. It affects 1 product.

PackageAffectedFixed in
github.com/AlexxIT/go2rtc GoAll versions1.9.0
github.com/AlexxIT/go2rtc GoAll versions1.9.0
github.com/AlexxIT/go2rtc GoAll versions1.9.0

Products include Alexxit Go2rtc.

How do I fix CVE-2024-29191?

Upgrade github.com/AlexxIT/go2rtc to 1.9.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-29191 being exploited?

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

Sources

Also known as GHSA-wv8x-3w6r-6h7v, GO-2024-3055.

Is CVE-2024-29191 in your software?

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

Check your SBOMs for free