CVE-2024-12870
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedA 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceA stored cross-site scripting vulnerability exists in infiniflow/ragflow where unauthenticated attackers can upload HTML/XML files containing arbitrary JavaScript payloads. These files are served with the 'application/xml' content type, causing browsers to automatically render them and execute the embedded JavaScript in the user's browser context.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify if infiniflow/ragflow is installedCheck for the presence of ragflow in your environment - typically installed via Docker or from source. Look for running containers named 'ragflow' or check for the application directory.Affected if The infiniflow/ragflow application is present in your environment.
-
Verify the file upload endpoint is accessibleCheck if your ragflow deployment exposes the file upload functionality. Typically this would be at an endpoint like /api/v1/upload or similar. Test if unauthenticated access to upload endpoints is possible.Affected if The upload endpoint accepts requests without authentication or with weak authentication.
-
Test XML/HTML file upload acceptanceAttempt to upload a test file with .xml or .html extension containing a benign payload to the upload endpoint. Verify the upload succeeds and the file is stored.Affected if XML and HTML file uploads are accepted and stored without content validation.
-
Inspect served content-type headers for uploaded filesRetrieve the uploaded XML/HTML file via its download/view URL and examine the HTTP response headers, specifically the Content-Type header. Use a browser devtools network tab or curl -I to check.Affected if The Content-Type header is set to application/xml, text/html, or similar content types that trigger browser rendering instead of plain text download.
-
Check if content-type validation exists in configurationExamine the ragflow configuration files or source code for any content-type validation logic on uploads. Look for checks that enforce text/plain for XML/HTML files or reject executable script content.Affected if No content-type validation is configured, or the validation allows application/xml and text/html for user-uploaded files.
A user is affected if their ragflow instance accepts unauthenticated XML/HTML file uploads and serves them with a rendering content-type (application/xml or text/html) that causes browsers to execute embedded JavaScript.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
From vendor dataImplement content-type validation to serve uploaded XML/HTML files as 'text/plain' instead of 'application/xml' or 'text/html', and add file content validation to strip or reject executable script content from uploaded files.
- Consultation3.0 h
- Implementation6.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,984.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-12870 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2024-12870 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data