|
| 1 | +--- |
| 2 | +gem: nokogiri |
| 3 | +ghsa: vcc3-rw6f-jv97 |
| 4 | +url: https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xc9x-jj77-9p9j |
| 5 | +title: Use-after-free in libxml2 via Nokogiri::XML::Reader |
| 6 | +date: 2024-03-18 |
| 7 | +description: | |
| 8 | +
|
| 9 | + ### Summary |
| 10 | +
|
| 11 | + Nokogiri upgrades its dependency libxml2 as follows: |
| 12 | + - v1.15.6 upgrades libxml2 to 2.11.7 from 2.11.6 |
| 13 | + - v1.16.2 upgrades libxml2 to 2.12.5 from 2.12.4 |
| 14 | +
|
| 15 | + libxml2 v2.11.7 and v2.12.5 address the following vulnerability: |
| 16 | +
|
| 17 | + CVE-2024-25062 / https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-25062 |
| 18 | + - described at https://gitlab.gnome.org/GNOME/libxml2/-/issues/604 |
| 19 | + - patched by https://gitlab.gnome.org/GNOME/libxml2/-/commit/92721970 |
| 20 | +
|
| 21 | + Please note that this advisory only applies to the CRuby implementation |
| 22 | + of Nokogiri, and only if the packaged libraries are being used. If |
| 23 | + you've overridden defaults at installation time to use system libraries |
| 24 | + instead of packaged libraries, you should instead pay attention to |
| 25 | + your distro's libxml2 release announcements. |
| 26 | +
|
| 27 | + JRuby users are not affected. |
| 28 | +
|
| 29 | + ### Severity |
| 30 | +
|
| 31 | + The Nokogiri maintainers have evaluated this as **Moderate**. |
| 32 | +
|
| 33 | + ### Impact |
| 34 | +
|
| 35 | + From the CVE description, this issue applies to the `xmlTextReader` |
| 36 | + module (which underlies `Nokogiri::XML::Reader`): |
| 37 | +
|
| 38 | + > When using the XML Reader interface with DTD validation and |
| 39 | + > XInclude expansion enabled, processing crafted XML documents |
| 40 | + > can lead to an xmlValidatePopElement use-after-free. |
| 41 | +
|
| 42 | + ### Mitigation |
| 43 | +
|
| 44 | + Upgrade to Nokogiri `~> 1.15.6` or `>= 1.16.2`. |
| 45 | +
|
| 46 | + Users who are unable to upgrade Nokogiri may also choose a more |
| 47 | + complicated mitigation: compile and link Nokogiri against patched |
| 48 | + external libxml2 libraries which will also address these same issues. |
| 49 | +patched_versions: |
| 50 | + - "~> 1.15.6" |
| 51 | + - ">= 1.16.2" |
| 52 | +related: |
| 53 | + url: |
| 54 | + - https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-xc9x-jj77-9p9j |
| 55 | + - https://vulners.com/github/GHSA-VCC3-RW6F-JV97 |
| 56 | + - https://github.com/advisories/GHSA-vcc3-rw6f-jv97 |
0 commit comments