VDB
Sign up
HIGH7.5

GHSA-crjr-9rc5-ghw8

Nokogiri Inefficient Regular Expression Complexity

Quick fix

GHSA-crjr-9rc5-ghw8 — nokogiri: upgrade to the fixed version with the command below.

bundle update nokogiri

Details

## Summary

Nokogiri `< v1.13.4` contains an inefficient regular expression that is susceptible to excessive backtracking when attempting to detect encoding in HTML documents.

## Mitigation

Upgrade to Nokogiri `>= 1.13.4`.

## Severity

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).

## References

[CWE-1333](https://cwe.mitre.org/data/definitions/1333.html) Inefficient Regular Expression Complexity

## Credit

This vulnerability was reported by HackerOne user ooooooo_q (ななおく).

Are you affected?

Enter the version of the package you're using.

Affected packages

RubyGems/nokogiri
Introduced in: 0Fixed in: 1.13.4
Fixbundle update nokogiri

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:gem/nokogiri"]}'