The vulnerability lies in the case-sensitive nature of attribute name checking within the SVG sanitizer. The analysis of the provided patches reveals that multiple functions responsible for sanitizing attributes were flawed.
The root cause of the vulnerability is the use of case-sensitive functions like strpos, getAttribute, and getAttributeNS to identify and sanitize potentially dangerous attributes, specifically those related to href. An attacker could provide an SVG file with mixed-case attributes (e.g., xlink:hReF or HrEf) containing malicious JavaScript payloads. The sanitizer would fail to recognize these attributes as href attributes, thus bypassing the security checks and allowing the malicious code to be executed in the context of the user's browser.
The patch addresses this by replacing case-sensitive checks with case-insensitive alternatives (stripos) and by implementing a more robust attribute iteration logic that normalizes attribute names to lowercase before validation. The identified vulnerable functions, cleanAttributesOnWhitelist, cleanXlinkHrefs, and cleanHrefs, were all directly involved in this flawed, case-sensitive validation process and are the key indicators of this vulnerability being exploited in a runtime environment.