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