CVE-2025-45691: Ragas RAGAS Has An Arbitrary File Vulnerability

HIGH
Advisory Identifier: GHSA-v2xr-wvrv-p969
CVSS 7.5
CWE-770 CWE-918 CWE-22
Published
Advisory Summary

CVE-2025-45691 is a HIGH (CVSS 7.5) ragas has an arbitrary file vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Ragas libraries in the PyPI ecosystem. The issue involves ragas has an arbitrary file read vulnerability. Remediation is available by upgrading affected packages to version 0.3.0-rc1.

CVE-2025-45691 at a Glance

CVE Identifier CVE-2025-45691
GHSA Identifier GHSA-v2xr-wvrv-p969
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Ragas
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2025-45691

To remediate this vulnerability, upgrade all affected Ragas dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ragas fixed: 0.3.0-rc1
pip install ragas>=0.3.0-rc1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show ragas

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-45691, inspect your installed packages using pip:

pip show ragas

Analyze the terminal output to locate any version of Ragas in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.0-rc1), your application is affected.

Note: The pip show ragas command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Ragas, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

An Arbitrary File Read vulnerability exists in the ImageTextPromptValue class in Exploding Gradients RAGAS v0.2.3 to v0.2.14. The vulnerability stems from improper validation and sanitization of URLs supplied in the retrieved_contexts parameter when handling multimodal inputs.

CVE-2025-45691 Affected Ragas Versions

1 component(s)
Fixed Versions:
0.3.0-rc1
Product / Package Ecosystem Affected Versions Fixed Version
ragas
PyPI
≥ 0.2.3
< 0.3.0-rc1
0.3.0-rc1

References

Frequently Asked Questions

What is CVE-2025-45691?
CVE-2025-45691 is a security vulnerability in Ragas involving RAGAS has an Arbitrary File Read vulnerability under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Ragas versions are affected?
Affected versions include releases prior to 0.3.0-rc1 across affected packages: ragas.
What version fixes CVE-2025-45691?
Upgrading to 0.3.0-rc1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ragas affected?
Yes, ragas is affected in releases prior to 0.3.0-rc1. Upgrade your dependency to 0.3.0-rc1 or later.
What is the CVSS score of CVE-2025-45691?
CVE-2025-45691 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2025-45691?
CVE-2025-45691 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check PyPI dependencies for CVE-2025-45691?
Run the dependency tree command: 'pip show ragas'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v2xr-wvrv-p969",
  "modified" : "2026-04-08T22:21:50Z",
  "published" : "2026-03-05T21:30:46Z",
  "aliases" : [ "CVE-2025-45691" ],
  "summary" : "RAGAS has an Arbitrary File Read vulnerability",
  "details" : "An Arbitrary File Read vulnerability exists in the ImageTextPromptValue class in Exploding Gradients RAGAS v0.2.3 to v0.2.14. The vulnerability stems from improper validation and sanitization of URLs supplied in the retrieved_contexts parameter when handling multimodal inputs.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "ragas"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.3"
      }, {
        "fixed" : "0.3.0-rc1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-45691"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/explodinggradients/ragas/pull/1559"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vibrantlabsai/ragas/pull/1991"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/vibrantlabsai/ragas/commit/b28433709cbedbb531db79dadcfbdbd3aa6adcb0"
  }, {
    "type" : "WEB",
    "url" : "https://adithyanak.com/ragas-v0214-arbitrary-file-read-vulnerability"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/explodinggradients/ragas/blob/e97886ac976465efb60e5949c5d69baf30cc811d/src/ragas/prompt/multi_modal_prompt.py#L202"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vibrantlabsai/ragas"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-770", "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-06T22:23:31Z",
    "nvd_published_at" : "2026-03-05T19:16:00Z"
  }
}