
Cloud Vulnerability DB
A community-led vulnerabilities database
The vulnerability CVE-2021-1038 is related to improper sanitization of data URLs and style attributes in the lxml HTML Sanitizer. The issue was discovered by GitHub Security Lab team member Alvaro Muñoz and was disclosed on January 12, 2022. The vulnerability affects the lxml library, specifically its HTML sanitization functionality (GitHub Advisory).
The vulnerability consists of two main issues: First, improper sanitization of inline style attributes where the code uses insufficient regular expressions to remove import statements and expression calls. Second, improper sanitization of data URL images where the regular expression r'^data:image/.+;base64' allows potentially malicious data URLs containing SVG images with embedded JavaScript code. The vulnerability was tracked as CVE-2021-43818 (GitHub Advisory).
Both issues identified in the lxml HTML Sanitizer could lead to Cross-Site Scripting (XSS) attacks. The style attribute vulnerability has lower priority as XSS vectors on CSS styles typically don't work on modern browsers, while the data URL vulnerability could allow execution of malicious JavaScript code through SVG images (GitHub Advisory).
A fix for these vulnerabilities was released on December 12, 2021. The coordinated disclosure timeline indicates that the issues were reported on November 10, 2021, acknowledged the next day, and the fix was released approximately one month later (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."