Commit 774a97d
committed
fix(security): apply sanitization in refreshView() to prevent XSS (#580)
SECURITY FIX: XSS vulnerability when setting editor value via writeValue()
The refreshView() method was setting innerHTML without sanitization,
allowing XSS payloads to execute even with sanitize: true config.
This affected all programmatic value setting:
- ngModel binding
- FormControl setValue/patchValue
- Direct property assignment
Now applies DomSanitizer in refreshView() based on config.sanitize flag.
Fix verified with PoC from @MarioTesoro.
Fixes #5801 parent 4f7951f commit 774a97d
File tree
1 file changed
+5
-1
lines changed- projects/angular-editor/src/lib/editor
1 file changed
+5
-1
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
279 | 283 | | |
280 | 284 | | |
281 | 285 | | |
| |||
0 commit comments