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

Medium 5.4 Published Updated

Attackers can execute arbitrary scripts in victims' browsers by uploading malicious PDFs to the knowledge base, leading to session hijacking or data theft.

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

CVE-2024-12871 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

An XSS vulnerability in infiniflow/ragflow version 0.12.0 allows an attacker to upload a malicious PDF file to the knowledge base. When the file is viewed within Ragflow, the payload is executed in the context of the user's browser. This can lead to session hijacking, data exfiltration, or unauthorized actions performed on behalf of the victim, compromising sensitive user data and affecting the integrity of the entire application.

Weakness: CWE-79

Which versions are affected by CVE-2024-12871?

It affects 1 product.

Products include Infiniflow Ragflow.

How do I fix CVE-2024-12871?

No fix has been published for CVE-2024-12871 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-12871 being exploited?

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

Sources

Also known as GHSA-hw3w-6mhf-rh8m.

Is CVE-2024-12871 in your software?

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

Check your SBOMs for free