{"id":"ALPINE-CVE-2021-28957","details":"An XSS vulnerability was discovered in python-lxml's clean module versions before 4.6.3. When disabling the safe_attrs_only and forms arguments, the Cleaner class does not remove the formaction attribute allowing for JS to bypass the sanitizer. A remote attacker could exploit this flaw to run arbitrary JS code on users who interact with incorrectly sanitized HTML. This issue is patched in lxml 4.6.3.","modified":"2026-03-09T01:22:43.063533Z","published":"2021-03-21T05:15:13.367Z","upstream":["CVE-2021-28957"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2021-28957"}],"affected":[{"package":{"name":"py3-lxml","ecosystem":"Alpine:v3.16","purl":"pkg:apk/alpine/py3-lxml?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.3-r0"}]}],"versions":["2.2.6-r0","2.2.8-r0","2.2.8-r1","2.3.4-r1","2.3.5-r0","3.1.0-r0","3.2.3-r0","3.3.2-r0","3.4.0-r0","3.4.4-r0","3.5.0-r0","3.6.0-r0","3.6.0-r1","3.6.4-r0","3.7.1-r0","3.7.2-r0","3.7.2-r1","3.8.0-r0","4.0.0-r0","4.1.0-r0","4.1.0-r1","4.1.1-r0","4.2.0-r0","4.2.1-r0","4.2.2-r0","4.2.3-r0","4.2.4-r0","4.2.5-r0","4.3.2-r0","4.3.3-r0","4.3.3-r1","4.3.4-r0","4.4.0-r0","4.4.1-r0","4.4.1-r1","4.4.1-r2","4.4.1-r3","4.4.2-r0","4.4.3-r0","4.5.0-r0","4.5.1-r0","4.5.2-r0","4.6.0-r0","4.6.1-r0","4.6.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-28957.json"}},{"package":{"name":"py3-lxml","ecosystem":"Alpine:v3.17","purl":"pkg:apk/alpine/py3-lxml?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.3-r0"}]}],"versions":["2.2.6-r0","2.2.8-r0","2.2.8-r1","2.3.4-r1","2.3.5-r0","3.1.0-r0","3.2.3-r0","3.3.2-r0","3.4.0-r0","3.4.4-r0","3.5.0-r0","3.6.0-r0","3.6.0-r1","3.6.4-r0","3.7.1-r0","3.7.2-r0","3.7.2-r1","3.8.0-r0","4.0.0-r0","4.1.0-r0","4.1.0-r1","4.1.1-r0","4.2.0-r0","4.2.1-r0","4.2.2-r0","4.2.3-r0","4.2.4-r0","4.2.5-r0","4.3.2-r0","4.3.3-r0","4.3.3-r1","4.3.4-r0","4.4.0-r0","4.4.1-r0","4.4.1-r1","4.4.1-r2","4.4.1-r3","4.4.2-r0","4.4.3-r0","4.5.0-r0","4.5.1-r0","4.5.2-r0","4.6.0-r0","4.6.1-r0","4.6.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-28957.json"}},{"package":{"name":"py3-lxml","ecosystem":"Alpine:v3.18","purl":"pkg:apk/alpine/py3-lxml?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.3-r0"}]}],"versions":["2.2.6-r0","2.2.8-r0","2.2.8-r1","2.3.4-r1","2.3.5-r0","3.1.0-r0","3.2.3-r0","3.3.2-r0","3.4.0-r0","3.4.4-r0","3.5.0-r0","3.6.0-r0","3.6.0-r1","3.6.4-r0","3.7.1-r0","3.7.2-r0","3.7.2-r1","3.8.0-r0","4.0.0-r0","4.1.0-r0","4.1.0-r1","4.1.1-r0","4.2.0-r0","4.2.1-r0","4.2.2-r0","4.2.3-r0","4.2.4-r0","4.2.5-r0","4.3.2-r0","4.3.3-r0","4.3.3-r1","4.3.4-r0","4.4.0-r0","4.4.1-r0","4.4.1-r1","4.4.1-r2","4.4.1-r3","4.4.2-r0","4.4.3-r0","4.5.0-r0","4.5.1-r0","4.5.2-r0","4.6.0-r0","4.6.1-r0","4.6.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-28957.json"}},{"package":{"name":"py3-lxml","ecosystem":"Alpine:v3.19","purl":"pkg:apk/alpine/py3-lxml?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.3-r0"}]}],"versions":["2.2.6-r0","2.2.8-r0","2.2.8-r1","2.3.4-r1","2.3.5-r0","3.1.0-r0","3.2.3-r0","3.3.2-r0","3.4.0-r0","3.4.4-r0","3.5.0-r0","3.6.0-r0","3.6.0-r1","3.6.4-r0","3.7.1-r0","3.7.2-r0","3.7.2-r1","3.8.0-r0","4.0.0-r0","4.1.0-r0","4.1.0-r1","4.1.1-r0","4.2.0-r0","4.2.1-r0","4.2.2-r0","4.2.3-r0","4.2.4-r0","4.2.5-r0","4.3.2-r0","4.3.3-r0","4.3.3-r1","4.3.4-r0","4.4.0-r0","4.4.1-r0","4.4.1-r1","4.4.1-r2","4.4.1-r3","4.4.2-r0","4.4.3-r0","4.5.0-r0","4.5.1-r0","4.5.2-r0","4.6.0-r0","4.6.1-r0","4.6.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-28957.json"}},{"package":{"name":"py3-lxml","ecosystem":"Alpine:v3.20","purl":"pkg:apk/alpine/py3-lxml?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.3-r0"}]}],"versions":["2.2.6-r0","2.2.8-r0","2.2.8-r1","2.3.4-r1","2.3.5-r0","3.1.0-r0","3.2.3-r0","3.3.2-r0","3.4.0-r0","3.4.4-r0","3.5.0-r0","3.6.0-r0","3.6.0-r1","3.6.4-r0","3.7.1-r0","3.7.2-r0","3.7.2-r1","3.8.0-r0","4.0.0-r0","4.1.0-r0","4.1.0-r1","4.1.1-r0","4.2.0-r0","4.2.1-r0","4.2.2-r0","4.2.3-r0","4.2.4-r0","4.2.5-r0","4.3.2-r0","4.3.3-r0","4.3.3-r1","4.3.4-r0","4.4.0-r0","4.4.1-r0","4.4.1-r1","4.4.1-r2","4.4.1-r3","4.4.2-r0","4.4.3-r0","4.5.0-r0","4.5.1-r0","4.5.2-r0","4.6.0-r0","4.6.1-r0","4.6.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-28957.json"}},{"package":{"name":"py3-lxml","ecosystem":"Alpine:v3.21","purl":"pkg:apk/alpine/py3-lxml?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.3-r0"}]}],"versions":["2.2.6-r0","2.2.8-r0","2.2.8-r1","2.3.4-r1","2.3.5-r0","3.1.0-r0","3.2.3-r0","3.3.2-r0","3.4.0-r0","3.4.4-r0","3.5.0-r0","3.6.0-r0","3.6.0-r1","3.6.4-r0","3.7.1-r0","3.7.2-r0","3.7.2-r1","3.8.0-r0","4.0.0-r0","4.1.0-r0","4.1.0-r1","4.1.1-r0","4.2.0-r0","4.2.1-r0","4.2.2-r0","4.2.3-r0","4.2.4-r0","4.2.5-r0","4.3.2-r0","4.3.3-r0","4.3.3-r1","4.3.4-r0","4.4.0-r0","4.4.1-r0","4.4.1-r1","4.4.1-r2","4.4.1-r3","4.4.2-r0","4.4.3-r0","4.5.0-r0","4.5.1-r0","4.5.2-r0","4.6.0-r0","4.6.1-r0","4.6.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-28957.json"}},{"package":{"name":"py3-lxml","ecosystem":"Alpine:v3.22","purl":"pkg:apk/alpine/py3-lxml?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.3-r0"}]}],"versions":["2.2.6-r0","2.2.8-r0","2.2.8-r1","2.3.4-r1","2.3.5-r0","3.1.0-r0","3.2.3-r0","3.3.2-r0","3.4.0-r0","3.4.4-r0","3.5.0-r0","3.6.0-r0","3.6.0-r1","3.6.4-r0","3.7.1-r0","3.7.2-r0","3.7.2-r1","3.8.0-r0","4.0.0-r0","4.1.0-r0","4.1.0-r1","4.1.1-r0","4.2.0-r0","4.2.1-r0","4.2.2-r0","4.2.3-r0","4.2.4-r0","4.2.5-r0","4.3.2-r0","4.3.3-r0","4.3.3-r1","4.3.4-r0","4.4.0-r0","4.4.1-r0","4.4.1-r1","4.4.1-r2","4.4.1-r3","4.4.2-r0","4.4.3-r0","4.5.0-r0","4.5.1-r0","4.5.2-r0","4.6.0-r0","4.6.1-r0","4.6.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-28957.json"}},{"package":{"name":"py3-lxml","ecosystem":"Alpine:v3.23","purl":"pkg:apk/alpine/py3-lxml?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.3-r0"}]}],"versions":["2.2.6-r0","2.2.8-r0","2.2.8-r1","2.3.4-r1","2.3.5-r0","3.1.0-r0","3.2.3-r0","3.3.2-r0","3.4.0-r0","3.4.4-r0","3.5.0-r0","3.6.0-r0","3.6.0-r1","3.6.4-r0","3.7.1-r0","3.7.2-r0","3.7.2-r1","3.8.0-r0","4.0.0-r0","4.1.0-r0","4.1.0-r1","4.1.1-r0","4.2.0-r0","4.2.1-r0","4.2.2-r0","4.2.3-r0","4.2.4-r0","4.2.5-r0","4.3.2-r0","4.3.3-r0","4.3.3-r1","4.3.4-r0","4.4.0-r0","4.4.1-r0","4.4.1-r1","4.4.1-r2","4.4.1-r3","4.4.2-r0","4.4.3-r0","4.5.0-r0","4.5.1-r0","4.5.2-r0","4.6.0-r0","4.6.1-r0","4.6.2-r0"],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-28957.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}