{"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-09-15T08:17:46.644729065Z","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"}]}],"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"}]}],"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"}]}],"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"}]}],"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"}]}],"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"}]}],"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"}]}],"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"}]}],"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.24","purl":"pkg:apk/alpine/py3-lxml?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.6.3-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/alpine/ALPINE-CVE-2021-28957.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}