{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2024-52595","published":"2024-11-19T22:15:21.120000Z","last_modified":"2026-06-17T08:07:31.003000Z","status":"Analyzed","cvss":{"version":"3.1","score":6.1,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","source":"nvd@nist.gov","primary":true},"auth":false,"cwes":["CWE-79","CWE-83","CWE-184"],"cpes":[{"criteria":"cpe:2.3:a:fedoralovespython:lxml_html_clean:*:*:*:*:*:python:*:*","part":"a","vendor":"fedoralovespython","product":"lxml_html_clean","version_end_excluding":"0.4.0"}],"cpes_truncated":false,"vendors":["fedoralovespython"],"products":["fedoralovespython/lxml_html_clean"],"ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial"},"epss":{"score":0.0096,"percentile":0.60173,"date":"2026-11-30","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-5jfw-gq64-q45f","ecosystem":"PyPI","name":"lxml-html-clean","purl":"pkg:pypi/lxml-html-clean","ranges":[{"introduced":"0","fixed":"0.4.0"}],"versions":["0.1.0","0.1.1","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1"],"versions_truncated":false},{"advisory":"PYSEC-2024-160","ecosystem":"PyPI","name":"lxml-html-clean","purl":"pkg:pypi/lxml-html-clean","ranges":[{"introduced":"0","fixed":"0.4.0"}],"versions":["0.1.0","0.1.1","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1"],"versions_truncated":false}],"severity":"medium","priority_score":52,"links":{"html_es":"/es/cve/CVE-2024-52595/","html_en":"/en/cve/CVE-2024-52595/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-52595","cve_org":"https://www.cve.org/CVERecord?id=CVE-2024-52595"},"untrusted":{"vendor_name":"Fedoralovespython","product_name":"Lxml Html Clean","desc_en":"lxml_html_clean is a project for HTML cleaning functionalities copied from `lxml.html.clean`. Prior to version 0.4.0, the HTML Parser in lxml does not properly handle context-switching for special HTML tags such as `<svg>`, `<math>` and `<noscript>`. This behavior deviates from how web browsers parse and interpret such tags. Specifically, content in CSS comments is ignored by lxml_html_clean but may be interpreted differently by web browsers, enabling malicious scripts to bypass the cleaning process. This vulnerability could lead to Cross-Site Scripting (XSS) attacks, compromising the security of users relying on lxml_html_clean in default configuration for sanitizing untrusted HTML content. Users employing the HTML cleaner in a security-sensitive context should upgrade to lxml 0.4.0, which addresses this issue. As a temporary mitigation, users can configure lxml_html_clean with the following settings to prevent the exploitation of this vulnerability. Via `remove_tags`, one may specify tags to remove - their content is moved to their parents' tags. Via `kill_tags`, one may specify tags to be removed completely. Via `allow_tags`, one may restrict the set of permissible tags, excluding context-switching tags like `<svg>`, `<math>` and `<noscript>`.","affected":[{"untrusted_vendor":"fedora-python","untrusted_product":"lxml_html_clean","versions":[]}],"references":[{"url":"https://github.com/fedora-python/lxml_html_clean/commit/c5d816f86eb3707d72a8ecf5f3823e0daa1b3808","tags":["Patch"]},{"url":"https://github.com/fedora-python/lxml_html_clean/pull/19","tags":["Patch"]},{"url":"https://github.com/fedora-python/lxml_html_clean/security/advisories/GHSA-5jfw-gq64-q45f","tags":["Mitigation","Vendor Advisory"]}]}}