{"api_version":"1","generated_at":"2026-04-23T06:20:36+00:00","cve":"CVE-2022-23476","urls":{"html":"https://cve.report/CVE-2022-23476","api":"https://cve.report/api/cve/CVE-2022-23476.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-23476","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-23476"},"summary":{"title":"CVE-2022-23476","description":"Nokogiri is an open source XML and HTML library for the Ruby programming language. Nokogiri `1.13.8` and `1.13.9` fail 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. For applications using `XML::Reader` to parse untrusted inputs, this may potentially be a vector for a denial of service attack. Users are advised to upgrade to Nokogiri `>= 1.13.10`. 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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-12-08 04:15:00","updated_at":"2022-12-10 03:10:00"},"problem_types":["CWE-476","CWE-252"],"metrics":[],"references":[{"url":"https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50","name":"https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50","refsource":"MISC","tags":[],"title":"fix(cruby): XML::Reader#attribute_hash returns nil on error · sparklemotion/nokogiri@9fe0761 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprj","name":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprj","refsource":"MISC","tags":[],"title":"Unchecked return value from xmlTextReaderExpand · Advisory · sparklemotion/nokogiri · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ce","name":"https://github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ce","refsource":"MISC","tags":[],"title":"Merge pull request #2715 from sparklemotion/flavorjones-fix-reader-er… · sparklemotion/nokogiri@85410e3 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-23476","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23476","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"23476","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"nokogiri","cpe5":"nokogiri","cpe6":"1.13.8","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"23476","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"nokogiri","cpe5":"nokogiri","cpe6":"1.13.9","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"ruby","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-23476","qid":"184494","title":"Debian Security Update for ruby-nokogiri (CVE-2022-23476)"},{"cve":"CVE-2022-23476","qid":"283531","title":"Fedora Security Update for rubygem (FEDORA-2022-acff3f54b2)"},{"cve":"CVE-2022-23476","qid":"283532","title":"Fedora Security Update for rubygem (FEDORA-2022-b5c325caad)"},{"cve":"CVE-2022-23476","qid":"502609","title":"Alpine Linux Security Update for ruby-nokogiri"}]},"source_records":{"cve_program":{"data_version":"4.0","data_type":"CVE","data_format":"MITRE","CVE_data_meta":{"ID":"CVE-2022-23476","ASSIGNER":"security-advisories@github.com","STATE":"PUBLIC"},"description":{"description_data":[{"lang":"eng","value":"Nokogiri is an open source XML and HTML library for the Ruby programming language. Nokogiri `1.13.8` and `1.13.9` fail 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. For applications using `XML::Reader` to parse untrusted inputs, this may potentially be a vector for a denial of service attack. Users are advised to upgrade to Nokogiri `>= 1.13.10`. 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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-252: Unchecked Return Value","cweId":"CWE-252"}]},{"description":[{"lang":"eng","value":"CWE-476: NULL Pointer Dereference","cweId":"CWE-476"}]}]},"affects":{"vendor":{"vendor_data":[{"vendor_name":"sparklemotion","product":{"product_data":[{"product_name":"nokogiri","version":{"version_data":[{"version_value":">= 1.13.8, < 1.13.10","version_affected":"="}]}}]}}]}},"references":{"reference_data":[{"url":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprj","refsource":"MISC","name":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-qv4q-mr5r-qprj"},{"url":"https://github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ce","refsource":"MISC","name":"https://github.com/sparklemotion/nokogiri/commit/85410e38410f670cbbc8c5b00d07b843caee88ce"},{"url":"https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50","refsource":"MISC","name":"https://github.com/sparklemotion/nokogiri/commit/9fe0761c47c0d4270d1a5220cfd25de080350d50"}]},"source":{"advisory":"GHSA-qv4q-mr5r-qprj","discovery":"UNKNOWN"},"impact":{"cvss":[{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","version":"3.1"}]}},"nvd":{"publishedDate":"2022-12-08 04:15:00","lastModifiedDate":"2022-12-10 03:10:00","problem_types":["CWE-476","CWE-252"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:nokogiri:nokogiri:1.13.9:*:*:*:*:ruby:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:nokogiri:nokogiri:1.13.8:*:*:*:*:ruby:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2022","CveId":"23476","Ordinal":"226340","Title":"CVE-2022-23476","CVE":"CVE-2022-23476","Year":"2022"},"notes":[{"CveYear":"2022","CveId":"23476","Ordinal":"1","NoteData":"** RESERVED ** This candidate has been reserved by an organization or individual that will use it when announcing a new security problem. When the candidate has been publicized, the details for this candidate will be provided.","Type":"Description","Title":null}]}}}