Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. nokogiri
  4. ›
  5. CVE-2022-40303

CVE-2022-40303: Integer Overflow or Wraparound

November 23, 2022 (updated November 9, 2023)

An issue was discovered in Nogokiri’s vendored libxml2 library. When parsing a multi-gigabyte XML document with the XML_PARSE_HUGE parser option enabled, several integer counters can overflow. This results in an attempt to access an array at a negative 2GB offset, typically leading to a segmentation fault.

References

  • nokogiri.org/CHANGELOG.html
  • nvd.nist.gov/vuln/detail/CVE-2022-40303

Code Behaviors & Features

Detect and mitigate CVE-2022-40303 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.13.9

Fixed versions

  • 1.13.9

Solution

Upgrade to version 1.13.9 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-190: Integer Overflow or Wraparound

Source file

gem/nokogiri/CVE-2022-40303.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:16 +0000.