Описание
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri::XML::NodeSet#[] (and its alias #slice) checked the requested index against the node set's bounds using a 32-bit-truncated copy of the index. A large negative index could pass the check and then be used at full width, reading outside the node set's storage. On CRuby this is an out-of-bounds read that typically crashes the process; on JRuby it is not memory-unsafe but returns an incorrect node. This vulnerability is fixed in 1.19.4.
A flaw was found in Nokogiri, an XML and HTML library for Ruby. This vulnerability allows an attacker to trigger an out-of-bounds read by providing a specially crafted large negative index to certain methods. This can lead to a denial of service (DoS) by crashing the application on CRuby, or by returning incorrect data on JRuby.
Отчет
Red Hat ships Nokogiri as a dependency in several products (Satellite, 3scale API Management, RHEL BuildRoot). The vulnerable code path requires an attacker to supply a specially crafted large negative integer index to Nokogiri::XML::NodeSet#[] or #slice. Typically, NodeSet indices are not directly exposed to untrusted user input, which limits the practical exploitability of this flaw. On CRuby (used in Red Hat products), exploitation results in a process crash (denial of service) due to an out-of-bounds read, but does not lead to information disclosure or code execution.
Меры по смягчению последствий
There is no mitigation for this flaw other than upgrading to Nokogiri 1.19.4 or later. If upgrading is not immediately possible, review application code to ensure that untrusted user input is not passed as an index to Nokogiri::XML::NodeSet#[] or #slice methods.
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat 3scale API Management Platform 2 | 3scale-amp21/backend | Fix deferred | ||
| Red Hat 3scale API Management Platform 2 | 3scale-amp21/system | Fix deferred | ||
| Red Hat 3scale API Management Platform 2 | 3scale-amp21/zync | Fix deferred | ||
| Red Hat 3scale API Management Platform 2 | 3scale-amp22/backend | Fix deferred | ||
| Red Hat 3scale API Management Platform 2 | 3scale-amp22/system | Fix deferred | ||
| Red Hat 3scale API Management Platform 2 | 3scale-amp22/zync | Fix deferred | ||
| Red Hat 3scale API Management Platform 2 | 3scale-amp26/toolbox | Fix deferred | ||
| Red Hat 3scale API Management Platform 2 | 3scale-amp2/backend-rhel8 | Fix deferred | ||
| Red Hat 3scale API Management Platform 2 | 3scale-amp2/system-rhel7 | Fix deferred | ||
| Red Hat 3scale API Management Platform 2 | 3scale-amp2/system-rhel8 | Fix deferred |
Показывать по
Дополнительная информация
Статус:
5.9 Medium
CVSS3
Связанные уязвимости
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri::XML::NodeSet#[] (and its alias #slice) checked the requested index against the node set's bounds using a 32-bit-truncated copy of the index. A large negative index could pass the check and then be used at full width, reading outside the node set's storage. On CRuby this is an out-of-bounds read that typically crashes the process; on JRuby it is not memory-unsafe but returns an incorrect node. This vulnerability is fixed in 1.19.4.
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri::XML::NodeSet#[] (and its alias #slice) checked the requested index against the node set's bounds using a 32-bit-truncated copy of the index. A large negative index could pass the check and then be used at full width, reading outside the node set's storage. On CRuby this is an out-of-bounds read that typically crashes the process; on JRuby it is not memory-unsafe but returns an incorrect node. This vulnerability is fixed in 1.19.4.
Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]`
Nokogiri is an open source XML and HTML library for the Ruby programmi ...
5.9 Medium
CVSS3