You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: "Unchecked return value from xmlTextReaderExpand"
6
+
date: 2022-12-07
7
+
description: |
8
+
## Summary
9
+
10
+
Nokogiri `1.13.8, 1.13.9` fails to check the return value from `xmlTextReaderExpand` in the method `Nokogiri::XML::Reader#attribute_hash`. This can lead to a null pointer exception when invalid markup is being parsed.
11
+
12
+
For applications using `XML::Reader` to parse untrusted inputs, this may potentially be a vector for a denial of service attack.
13
+
14
+
15
+
## Mitigation
16
+
17
+
Upgrade to Nokogiri `>= 1.13.10`.
18
+
19
+
Users may be able to search their code for calls to either `XML::Reader#attributes` or `XML::Reader#attribute_hash` to determine if they are affected.
20
+
21
+
22
+
## Severity
23
+
24
+
The Nokogiri maintainers have evaluated this as [High Severity 7.5 (CVSS3.1)](https://www.first.org/cvss/calculator/3.1#CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
25
+
26
+
27
+
## References
28
+
29
+
- [CWE - CWE-252: Unchecked Return Value (4.9)](https://cwe.mitre.org/data/definitions/252.html)
0 commit comments