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