{"id":"CVE-2021-28957","state":"PUBLISHED","title":"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 t","description":"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.","publishedAt":"2021-03-21T04:39:35.000Z","updatedAt":"2025-12-17T21:31:43.446Z","severity":{"score":6.1,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","source":"CISA-ADP"},"assigner":"mitre","products":["n/a n/a"],"affected":[{"vendor":"n/a","product":"n/a","versions":[{"version":"n/a","status":"affected"}]}],"references":["https://bugs.launchpad.net/lxml/+bug/1888153","https://github.com/lxml/lxml/pull/316/commits/10ec1b4e9f93713513a3264ed6158af22492f270","https://lists.debian.org/debian-lts-announce/2021/03/msg00031.html","https://www.debian.org/security/2021/dsa-4880","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3C2R44VDUY7FJVMAVRZ2WY7XYL4SVN45/","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XXN3QPWCTQVOGW4BMWV3AUUZZ4NRZNSQ/","https://www.oracle.com/security-alerts/cpuoct2021.html","https://github.com/lxml/lxml/commit/a5f9cb52079dc57477c460dbe6ba0f775e14a999","https://security.netapp.com/advisory/ntap-20210521-0004/","https://security.gentoo.org/glsa/202208-06"],"weaknesses":["CWE-79"],"ingestedAt":"2026-10-29T19:48:19.096Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/28xxx/CVE-2021-28957.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-28957","state":"PUBLISHED","datePublished":"2021-03-21T04:39:35.000Z","dateUpdated":"2025-12-17T21:31:43.446Z","assignerShortName":"mitre","assignerOrgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","dateReserved":"2021-03-21T00:00:00.000Z"},"containers":{"cna":{"descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"n/a","product":"n/a","versions":[{"version":"n/a","status":"affected"}]}],"references":[{"url":"https://bugs.launchpad.net/lxml/+bug/1888153","tags":["x_refsource_MISC"]},{"url":"https://github.com/lxml/lxml/pull/316/commits/10ec1b4e9f93713513a3264ed6158af22492f270","tags":["x_refsource_MISC"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/03/msg00031.html","name":"[debian-lts-announce] 20210324 [SECURITY] [DLA 2606-1] lxml security update","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://www.debian.org/security/2021/dsa-4880","name":"DSA-4880","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3C2R44VDUY7FJVMAVRZ2WY7XYL4SVN45/","name":"FEDORA-2021-28723f9670","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XXN3QPWCTQVOGW4BMWV3AUUZZ4NRZNSQ/","name":"FEDORA-2021-4cdb0f68c7","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2021.html","tags":["x_refsource_MISC"]},{"url":"https://github.com/lxml/lxml/commit/a5f9cb52079dc57477c460dbe6ba0f775e14a999","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20210521-0004/","tags":["x_refsource_CONFIRM"]},{"url":"https://security.gentoo.org/glsa/202208-06","name":"GLSA-202208-06","tags":["vendor-advisory","x_refsource_GENTOO"]}],"problemTypes":[{"descriptions":[{"description":"n/a","lang":"en","type":"text"}]}],"providerMetadata":{"shortName":"mitre","dateUpdated":"2022-08-10T05:06:44.000Z","orgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca"},"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"cve@mitre.org","ID":"CVE-2021-28957","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"n/a","version":{"version_data":[{"version_value":"n/a"}]}}]},"vendor_name":"n/a"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"n/a"}]}]},"references":{"reference_data":[{"name":"https://bugs.launchpad.net/lxml/+bug/1888153","refsource":"MISC","url":"https://bugs.launchpad.net/lxml/+bug/1888153"},{"name":"https://github.com/lxml/lxml/pull/316/commits/10ec1b4e9f93713513a3264ed6158af22492f270","refsource":"MISC","url":"https://github.com/lxml/lxml/pull/316/commits/10ec1b4e9f93713513a3264ed6158af22492f270"},{"name":"[debian-lts-announce] 20210324 [SECURITY] [DLA 2606-1] lxml security update","refsource":"MLIST","url":"https://lists.debian.org/debian-lts-announce/2021/03/msg00031.html"},{"name":"DSA-4880","refsource":"DEBIAN","url":"https://www.debian.org/security/2021/dsa-4880"},{"name":"FEDORA-2021-28723f9670","refsource":"FEDORA","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3C2R44VDUY7FJVMAVRZ2WY7XYL4SVN45/"},{"name":"FEDORA-2021-4cdb0f68c7","refsource":"FEDORA","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XXN3QPWCTQVOGW4BMWV3AUUZZ4NRZNSQ/"},{"name":"https://www.oracle.com/security-alerts/cpuoct2021.html","refsource":"MISC","url":"https://www.oracle.com/security-alerts/cpuoct2021.html"},{"name":"https://github.com/lxml/lxml/commit/a5f9cb52079dc57477c460dbe6ba0f775e14a999","refsource":"MISC","url":"https://github.com/lxml/lxml/commit/a5f9cb52079dc57477c460dbe6ba0f775e14a999"},{"name":"https://security.netapp.com/advisory/ntap-20210521-0004/","refsource":"CONFIRM","url":"https://security.netapp.com/advisory/ntap-20210521-0004/"},{"name":"GLSA-202208-06","refsource":"GENTOO","url":"https://security.gentoo.org/glsa/202208-06"}]}}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://bugs.launchpad.net/lxml/+bug/1888153","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/lxml/lxml/pull/316/commits/10ec1b4e9f93713513a3264ed6158af22492f270","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/03/msg00031.html","name":"[debian-lts-announce] 20210324 [SECURITY] [DLA 2606-1] lxml security update","tags":["mailing-list","x_refsource_MLIST","x_transferred"]},{"url":"https://www.debian.org/security/2021/dsa-4880","name":"DSA-4880","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3C2R44VDUY7FJVMAVRZ2WY7XYL4SVN45/","name":"FEDORA-2021-28723f9670","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XXN3QPWCTQVOGW4BMWV3AUUZZ4NRZNSQ/","name":"FEDORA-2021-4cdb0f68c7","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2021.html","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/lxml/lxml/commit/a5f9cb52079dc57477c460dbe6ba0f775e14a999","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://security.netapp.com/advisory/ntap-20210521-0004/","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://security.gentoo.org/glsa/202208-06","name":"GLSA-202208-06","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T21:55:12.376Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"CHANGED","version":"3.1","baseScore":6.1,"attackVector":"NETWORK","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","integrityImpact":"LOW","userInteraction":"REQUIRED","attackComplexity":"LOW","availabilityImpact":"NONE","privilegesRequired":"NONE","confidentialityImpact":"LOW"}},{"other":{"type":"ssvc","content":{"timestamp":"2025-12-17T21:31:40.372887Z","id":"CVE-2021-28957","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","type":"CWE","lang":"en","description":"CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-12-17T21:31:43.446Z"}}]}}}