Commit Detail
Commit 2c0276b
Fix HTMLRewriter AttributesIterator UAF on attribute mutation When element attributes are modified during iteration (via setAttribute or removeAttribute), lol-html's internal Vec may reallocate or shift elements, leaving the iterator's pointers dangling. Continuing to iterate would be a use-after-free (VULN-122672). Invalidate all live AttributesIterator instances whenever setAttribute() or removeAttribute() is called, and throw a clear error on subsequent next() calls. Fresh iterators created after mutation work normally.
Files changed
3 files changed~3 modified