CVE-2024-12870 Stored Cross-site Scripting (XSS) in infiniflow/ragflow

Medium 5.4 Published Updated

Attackers can inject JavaScript via uploaded XML files, leading to cookie theft and unauthorized access without authentication.

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
None listed

What is CVE-2024-12870?

CVE-2024-12870 is a medium-severity cross-site scripting vulnerability in infiniflow/ragflow, published on 20 Mar 2025. 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 stored cross-site scripting (XSS) vulnerability exists in infiniflow/ragflow, affecting the latest commit on the main branch (cec2080). The vulnerability allows an attacker to upload HTML/XML files that can host arbitrary JavaScript payloads. These files are served with the 'application/xml' content type, which is automatically rendered by browsers. This can lead to the execution of arbitrary JavaScript in the context of the user's browser, potentially allowing attackers to steal cookies and gain unauthorized access to user files and resources. The vulnerability does not require authentication, making it accessible to anyone with network access to the instance.

Weakness: CWE-79

Which versions are affected by CVE-2024-12870?

How do I fix CVE-2024-12870?

No fix has been published for CVE-2024-12870 yet. Limit exposure of the affected software until one is available.

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

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

Sources

Also known as GHSA-93qj-49fq-62jp.

Is CVE-2024-12870 in your software?

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

Check your SBOMs for free