Server-side Request Forgery (SSRF) Affecting ragas package, versions [0.2.3,0.3.0rc2)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.05% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Server-side Request Forgery (SSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-RAGAS-15440561
  • published8 Mar 2026
  • disclosed5 Mar 2026
  • creditAdithyan Arun Kumar

Introduced: 5 Mar 2026

NewCVE-2025-45691  (opens in a new tab)
CWE-918  (opens in a new tab)

How to fix?

Upgrade ragas to version 0.3.0rc2 or higher.

Overview

ragas is an Evaluation framework for RAG and LLM applications

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via improper validation of URLs in the retrieved_contexts parameter when processing multimodal inputs. An attacker can access arbitrary files, perform internal port scans, and retrieve sensitive cloud metadata by supplying crafted URLs to the evaluation pipeline.

Workaround

This vulnerability can be mitigated by implementing strict input validation to filter out malicious payloads before passing the retrieved_contexts parameter to the evaluation pipeline. Specifically, enforce an allowlist that only accepts http:// or https:// URLs, explicitly rejecting the file:// scheme. Additionally, ensure the account running the process operates with the principle of least privilege, restricting access to sensitive system files.

CVSS Base Scores

version 4.0
version 3.1