Snapshot attributes in DOM.removeAttributes to avoid skipping them
fix: snapshot attributes in DOM.removeAttributes to avoid skipping them (#8189)
Snapshot attributes in DOM.removeAttributes to avoid skipping them1da69f-fix-snapshot-attributes-in-dom-removeattributes-to-cve-2026-85061fixsnapshot attributes dom removeattributes avoid skipping
Committed by 0xKirisame
commit message
fix: snapshot attributes in DOM.removeAttributes to avoid skipping them (#8189)
* fix: snapshot attributes in DOM.removeAttributes to avoid skipping them
Iterating the live NamedNodeMap from elem.attributes while calling removeAttribute skips the attribute directly after a removed one, so a second dangerous attribute can survive DOM.sanitize. Snapshot the collection with Array.from before iterating.
* docs: add PR number to changelog entryEditor assessment
This commit patches CVE-2026-85061. Clear and specific. The body explains the actual bug: iterating the live NamedNodeMap while calling removeAttribute skips the attribute after a removed one, so a second dangerous attribute could survive sanitization. It then states the fix (Array.from snapshot) and notes the changelog entry. Subject, type and length are clean; the only missing element is a scope. Formally the header is clean and the body is separated; a scope is the only optional addition to an otherwise specific fix.