# CVE-2026-24770

## Summary

RAGFlow MinerU parser Zip Slip allows arbitrary file overwrite and potential RCE via malicious ZIP archives.

## Description

## Summary
RAGFlow versions prior to 0.23.1 are vulnerable to a Zip Slip path traversal in the MinerU parser that allows arbitrary file overwrite and can lead to remote code execution (RCE) when a crafted ZIP archive is processed.

## Details
The MinerUParser retrieves ZIP files from an external source (configured via the `mineru server url`) and extracts them using a function described as `extract zip no root`. The extraction routine does not sanitize filenames inside the ZIP archive, enabling path traversal (`../`) and overwrite of arbitrary files on the server. This can be abused to overwrite executable or configuration files and potentially achieve RCE.

## Affected Package
- Name: RAGFlow (ragflow)
- Ecosystem: (unspecified; open-source project)
- Affected versions: versions prior to 0.23.1
- Patched version: 0.23.1

## Reproduction Steps
> Note: The advisory indicates a Zip Slip in MinerU parser; exact endpoint/CLI invocation is not provided. Steps below reflect a typical Zip Slip exploit path for the described component.
1. Set up a vulnerable RAGFlow instance (any version prior to 0.23.1).
2. Configure the MinerU parser to fetch ZIPs from a controlled `mineru server url`.
3. Craft a ZIP archive containing a file with a path traversal filename, e.g. `../../../../tmp/pwned` or a path targeting a sensitive file.
4. Serve the malicious ZIP from the external MinerU server URL and trigger the MinerU parser to download and extract it.
5. Observe that the file is written outside the intended extraction directory.

## Indicators of Success
- An attacker-controlled file appears in a directory outside the expected extraction path (e.g., `/tmp/pwned`), or a sensitive file is overwritten.
- In a full exploit chain, overwritten executable/config files lead to code execution.

## References
- https://dbugs.ptsecurity.com/vulnerability/PT-2026-5027
- https://github.com/infiniflow/ragflow/security/advisories/GHSA-v7cf-w7gj-pgf4
- https://nvd.nist.gov/vuln/detail/CVE-2026-24770
- https://github.com/infiniflow/ragflow/commit/64c75d558e4a17a4a48953b4c201526431d8338f

