VDB
Sign up
CRITICAL9.8

GHSA-fr52-4hqw-p27f

Nokogiri does not forbid namespace nodes in XPointer ranges

Quick fix

GHSA-fr52-4hqw-p27f — nokogiri: upgrade to the fixed version with the command below.

bundle update nokogiri

Details

xpointer.c in libxml2 before 2.9.5 (as used in nokogiri before 1.7.1 amongst other products) does not forbid namespace nodes in XPointer ranges, which allows remote attackers to execute arbitrary code or cause a denial of service (use-after-free and memory corruption) via a crafted XML document.

Are you affected?

Enter the version of the package you're using.

Affected packages

RubyGems/nokogiri
Introduced in: 0Fixed in: 1.7.1
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"]}'