CVE-2025-45691: RAGAS Arbitrary File Read Vulnerability

ragas Updated 07 Mar 2026

Summary

05/03/2026
Yes i
High
7.5

CVE-2025-45691: RAGAS has an Arbitrary File Read vulnerability. Affects ragas versions >= 0.2.3, < 0.3.0-rc1. Fixed in 0.3.0-rc1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

RAGAS is a Python package designed for handling multimodal inputs, particularly in the context of image and text processing. It allows users to retrieve and manipulate various data formats seamlessly. However, versions 0.2.3 to 0.2.14 of RAGAS are vulnerable to an Arbitrary File Read issue due to improper validation of URLs in the retrieved_contexts parameter, which can lead to unauthorized access to sensitive files.

Vulnerability Detail

The Arbitrary File Read vulnerability in RAGAS arises from insufficient validation and sanitization of user-supplied URLs. This flaw allows attackers to exploit the application by providing malicious URLs, potentially leading to the exposure of sensitive files on the server. The vulnerability is classified under multiple CWEs, including CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-770 (Allocation of Resources Without Limits), and CWE-918 (Server-Side Request Forgery). The ramifications of this vulnerability can be severe, as it may allow unauthorized users to read sensitive files, compromising the security of the application.

How To Fix

Minimum fixed version

0.3.0-rc1

This is the first release that contains the fix.

pip install --upgrade "ragas==0.3.0-rc1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can implement input validation on the URLs provided in the retrieved_contexts parameter to ensure they do not point to sensitive files or directories. This can be done by sanitizing the input and restricting it to a predefined set of safe URLs.

Conclusion

The RAGAS package has a critical Arbitrary File Read vulnerability that affects versions 0.2.3 to 0.2.14. It is essential for users to update to version 0.3.0-rc1 or later to mitigate this risk. Implementing input validation can serve as a temporary workaround until the update is applied.

See every vulnerability recorded for ragas →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

Versions 0.2.3 to 0.2.14 of RAGAS are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If an immediate upgrade is not possible, implement input validation on the URLs to mitigate the risk temporarily.

More information can be found in the advisory database at GitHub or by checking the CVE details for CVE-2025-45691.

Related vulnerabilities

Recent vulnerabilities recorded for ragas.

How To Fix

Minimum fixed version

0.3.0-rc1

This is the first release that contains the fix.

pip install --upgrade "ragas==0.3.0-rc1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback