GHSA-r3w4-36x6-7r99: Duplicate Advisory Nokogiri Updates Packaged Libxml2 To Vulnerability

LOW
CWE-119
Published
Advisory Summary

GHSA-r3w4-36x6-7r99 is a LOW nokogiri updates packaged libxml2 to vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Duplicate Advisory libraries in the RubyGems ecosystem. The issue involves nokogiri updates packaged libxml2 to v2.12.7 to resolve cve-2024-34459. Remediation is available by upgrading affected packages to version 1.16.5.

GHSA-r3w4-36x6-7r99 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-r3w4-36x6-7r99
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
Affected Product Duplicate Advisory
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix GHSA-r3w4-36x6-7r99

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

nokogiri fixed: 1.16.5
Upgrade nokogiri to 1.16.5
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 nokogiri

How to Check if You Are Affected

To determine whether your application is affected by GHSA-r3w4-36x6-7r99, inspect your project dependencies for Duplicate Advisory:

inspect dependencies for nokogiri

Analyze the terminal output to locate any version of Duplicate Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.16.5), 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 Duplicate Advisory, 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

## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-r95h-9x8f-r3f7. This link is maintained to preserve external references. ## Original Description ## Summary Nokogiri v1.16.5 upgrades its dependency libxml2 to [2.12.7](https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.7) from 2.12.6. libxml2 v2.12.7 addresses CVE-2024-34459: - described at https://gitlab.gnome.org/GNOME/libxml2/-/issues/720 - patched by https://gitlab.gnome.org/GNOME/libxml2/-/commit/2876ac53 ## Impact There is no impact to Nokogiri users because the issue is present only in libxml2's `xmllint` tool which Nokogiri does not provide or expose. ## Timeline - 2024-05-13 05:57 EDT, libxml2 2.12.7 release is announced - 2024-05-13 08:30 EDT, nokogiri maintainers begin triage - 2024-05-13 10:05 EDT, nokogiri [v1.16.5 is released](https://github.com/sparklemotion/nokogiri/releases/tag/v1.16.5) and this GHSA made public

GHSA-r3w4-36x6-7r99 Affected Duplicate Advisory Versions

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

References

Frequently Asked Questions

What is GHSA-r3w4-36x6-7r99?
GHSA-r3w4-36x6-7r99 is a security vulnerability in Duplicate Advisory involving Nokogiri updates packaged libxml2 to v2.12.7 to resolve CVE-2024-34459 under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.
Which Duplicate Advisory versions are affected?
Affected versions include releases prior to 1.16.5 across affected packages: nokogiri.
What version fixes GHSA-r3w4-36x6-7r99?
Upgrading to 1.16.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nokogiri affected?
Yes, nokogiri is affected in releases prior to 1.16.5. Upgrade your dependency to 1.16.5 or later.
What CWE is associated with GHSA-r3w4-36x6-7r99?
GHSA-r3w4-36x6-7r99 is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer (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.).
How can I check RubyGems dependencies for GHSA-r3w4-36x6-7r99?
Run the dependency tree command: 'inspect dependencies for nokogiri'. 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-r3w4-36x6-7r99",
  "modified" : "2024-05-16T17:53:37Z",
  "published" : "2024-05-14T22:30:45Z",
  "withdrawn" : "2024-05-16T17:53:37Z",
  "aliases" : [ ],
  "summary" : "Duplicate Advisory: Nokogiri updates packaged libxml2 to v2.12.7 to resolve CVE-2024-34459",
  "details" : "## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-r95h-9x8f-r3f7. This link is maintained to preserve external references.\n\n## Original Description\n\n## Summary\n\nNokogiri v1.16.5 upgrades its dependency libxml2 to\n[2.12.7](https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.7) from 2.12.6.\n\nlibxml2 v2.12.7 addresses CVE-2024-34459:\n\n- described at https://gitlab.gnome.org/GNOME/libxml2/-/issues/720\n- patched by https://gitlab.gnome.org/GNOME/libxml2/-/commit/2876ac53\n\n## Impact\n\nThere is no impact to Nokogiri users because the issue is present only\nin libxml2's `xmllint` tool which Nokogiri does not provide or expose.\n\n## Timeline\n\n- 2024-05-13 05:57 EDT, libxml2 2.12.7 release is announced\n- 2024-05-13 08:30 EDT, nokogiri maintainers begin triage\n- 2024-05-13 10:05 EDT, nokogiri [v1.16.5 is released](https://github.com/sparklemotion/nokogiri/releases/tag/v1.16.5)\n  and this GHSA made public\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "nokogiri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.16.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-r95h-9x8f-r3f7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/GHSA-r95h-9x8f-r3f7.yml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sparklemotion/nokogiri"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.gnome.org/GNOME/libxml2/-/issues/720"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-119" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-14T22:30:45Z",
    "nvd_published_at" : null
  }
}