CVE-2022-24836: Inefficient Regular Expression Complexity in Nokogiri

Published Apr 11, 2022
·
Updated

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

References

CWE-1333 Inefficient Regular Expression Complexity

Credit

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

Other sources

A flaw was found in the nokogiri library when processing an inefficient and complex regular expression. This flaw allows an attacker to cause excessive consumption of resources, which affects performance.

Accounts. This issue was addressed with improved data protection.

Apple

AMD. A memory corruption issue was addressed with improved input validation.

Apple

AMD. An out-of-bounds write issue was addressed with improved input validation.

Apple

AppleMobileFileIntegrity. This issue was addressed by enabling hardened runtime.

Apple

Credit

CVE-2022-24836, CVE-2022-29181, Mickey Jin@@patch1t, Tommy Muir@@Muirey03, John Aakerblom@@jaakerblom, Antonio Zekic@@antoniozekic, Weijia Dai@@dwj1210(Momo Security), Ian Beer(Google Project Zero), Felix Poulin-Belanger, pattern-f@@pattern_F_(Ant Security Light), Adam Doupé(ASU SEFCOM), Apple, Adam M., CVE-2022-46716, Mickey Jin@@patch1t(Offensive Security), Csaba Fitzl@@theevilbit(Offensive Security), Jiwon Park, Mieszko Wawrzyniak, an anonymous researcher, Ivan Fratric(Google Project Zero), KirtiKumar Anandrao Ramchandani, Michael (Biscuit) Thomas, Wojciech Reguła@@_r3ggi(SecuRing), @@real_as3617, Hyeon Park@@tree_segment(Team ApplePIE), Maddie Stone(Google Project Zero), ChengGang Wu(Institute of Computing Technology), Yan Kang(Institute of Computing Technology), YuHao Hu(Institute of Computing Technology), Yue Sun(Institute of Computing Technology), Jiming Wang(Institute of Computing Technology), (Institute of Computing Technology), JiKai Ren(Institute of Computing Technology), Hang Shu(Institute of Computing Technology), Chinese Academy(Sciences), KirtiKumar Anandrao Ramchandani (kirtikumarar.com), hazbinhotel(Trend Micro Zero Day Initiative), Samuel Groß(Google V8 Security), Dohyun Lee@@l33d0hyun(DNSLab at Korea University), Ryan Shin(IAAI SecLab at Korea University), Clément Lecigne(Google's Threat Analysis Group), Thijs Alkemade@@xnyhps(Computest Sector 7), CVE-2022-35252, Linus Henze(Pinauten GmbH), Yonghwi Jin@@jinmo123(Theori), John Balestrieri(Tinrocket), Mickey Jin@@patch1t(Trend Micro), Pan ZhenPeng@@Peterpan0927(STAR Labs SG Pte), ABC Research s.r.o.

Affected Software

11 affected componentsFixes available
rubygems/nokogiri<1.13.4
1.13.4
redhat/rubygem-nokogiri<0:1.13.8-1.el8
0:1.13.8-1.el8
redhat/nokogiri<1.13.4
1.13.4
Apple macOS Ventura<13.1
13.1
Nokogiri Nokogiri Ruby<1.13.4
Fedoraproject Fedora=34
Fedoraproject Fedora=35
Fedoraproject Fedora=36
Debian Debian Linux=9.0
Debian Debian Linux=10.0
Apple macOS>=13.0<13.1

Event History

Apr 11, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Advisory Published
09:18 PM
Dec 13, 2022
Data Sourced
via Apple·12:00 AM
DescriptionWeaknessAffected Software
Updated
via Apple·12:00 AM
DescriptionWeakness
Updated
via Apple·12:00 AM
Description

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-24836?

CVE-2022-24836 is a vulnerability in Nokogiri < v1.13.4 that allows for excessive backtracking when attempting to detect encoding in HTML documents.

2

How can I mitigate the CVE-2022-24836 vulnerability?

To mitigate the CVE-2022-24836 vulnerability, upgrade to Nokogiri >= 1.13.4.

3

What is the severity of CVE-2022-24836?

CVE-2022-24836 has a severity rating of high.

4

What software is affected by CVE-2022-24836?

The affected software includes Nokogiri < 1.13.4, macOS Ventura 13.1, rubygem-nokogiri 0:1.13.8-1.el8, and redhat/nokogiri.

5

Where can I find more information about CVE-2022-24836?

You can find more information about CVE-2022-24836 on the following references: - Apple Support: [https://support.apple.com/en-us/HT213532](https://support.apple.com/en-us/HT213532) - GitHub Security Advisory: [https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-crjr-9rc5-ghw8](https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-crjr-9rc5-ghw8) - NVD: [https://nvd.nist.gov/vuln/detail/CVE-2022-24836](https://nvd.nist.gov/vuln/detail/CVE-2022-24836)

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203