CVE-2025-6490: Nokogiri Sparklemotion Nokogiri Hashmap.c Hashmap_set_with_hash Heap-based Vulnerability
LOWCVE-2025-6490 is a LOW (CVSS 3.3) sparklemotion nokogiri hashmap.c hashmap_set_with_hash heap-based vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Nokogiri libraries in the RubyGems ecosystem. The issue involves sparklemotion nokogiri hashmap.c hashmap_set_with_hash heap-based overflow. Remediation is available in the latest vendor maintenance releases.
CVE-2025-6490 at a Glance
Security Impact
CVSS: 3.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2025-6490
To remediate this vulnerability, upgrade all affected Nokogiri dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade nokogiri to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for nokogiri
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-6490, inspect your project dependencies for Nokogiri:
inspect dependencies for nokogiri
Analyze the terminal output to locate any version of Nokogiri in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Nokogiri, 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
CVE-2025-6490 Affected Nokogiri Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nokogiri
|
RubyGems |
0
All 1 versions
0
|
None specified
|
References
Frequently Asked Questions
What is CVE-2025-6490?
Which Nokogiri versions are affected?
What version fixes CVE-2025-6490?
Is nokogiri affected?
What is the CVSS score of CVE-2025-6490?
What CWE is associated with CVE-2025-6490?
How can I check RubyGems dependencies for CVE-2025-6490?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pf9w-gvcf-gv7m",
"modified" : "2025-06-30T21:44:21Z",
"published" : "2025-06-22T21:30:27Z",
"withdrawn" : "2025-06-30T20:45:04Z",
"aliases" : [ "CVE-2025-6490" ],
"summary" : "sparklemotion nokogiri hashmap.c hashmap_set_with_hash heap-based overflow",
"details" : "### Withdrawn Advisory\n\nThis advisory has been withdrawn because the affected code was never included in a release. This link has been maintained to preserve external references.\n\n### Original Description\n\nA vulnerability was found in sparklemotion nokogiri c29c920907366cb74af13b4dc2230e9c9e23b833 and classified as problematic. This issue affects the function hashmap_set_with_hash of the file gumbo-parser/src/hashmap.c. The manipulation leads to heap-based buffer overflow. An attack has to be approached locally. The exploit has been disclosed to the public and may be used. The real existence of this vulnerability is still doubted at the moment. The identifier of the patch is ada4708e5a67114402cd3feb70a4e1d1d7cf773a. It is recommended to apply a patch to fix this issue. The project maintainer explains that the affected code was merged into the main branch but the commit never appeared in an official release.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "nokogiri"
},
"versions" : [ "0" ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-6490"
}, {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/nokogiri/issues/3500"
}, {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/nokogiri/pull/3524"
}, {
"type" : "WEB",
"url" : "https://github.com/sparklemotion/nokogiri/commit/ada4708e5a67114402cd3feb70a4e1d1d7cf773a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sparklemotion/nokogiri"
}, {
"type" : "WEB",
"url" : "https://github.com/user-attachments/files/19625432/nokogiri_crash.txt"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?ctiid.313601"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?id.313601"
}, {
"type" : "WEB",
"url" : "https://vuldb.com/?submit.601005"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-119" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-30T20:45:04Z",
"nvd_published_at" : "2025-06-22T19:15:20Z"
}
}