All reports
Low

WordPress Core <= 7.1 - HTML API set_modifiable_text() Comment Boundary Break

Affected versions

WordPresswordpress
Affected versions
>=6.7 <=6.7.7 || >=6.8 <=6.8.8 || >=6.9 <=6.9.7 || >=7.0 <=7.0.4 || >=7.1 <=7.1
Fixed version
6.7.8 · 6.8.9 · 6.9.8 · 7.0.5 · 7.1.1

Description

WordPress Core's HTML API WP_HTML_Tag_Processor::set_modifiable_text() (since 6.7.0) used an incomplete comment-closer guard (/--!?>/) that missed the '-?>' abrupt-closing form, allowing text set into an HTML comment node to terminate the comment early. This is developer-facing hardening; there is no first-party sink that turns it into a direct vulnerability. Impact is realized only in plugin/theme code that round-trips attacker-controlled text through the HTML API into a comment node.

Links

Credits

  • Jeremy Felt

Data rights and licenses

Wordfence

Copyright 2012-2026 Defiant Inc.

Defiant hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute this software vulnerability information. Any copy of the software vulnerability information you make for such purposes is authorized provided that you include a hyperlink to this vulnerability record and reproduce Defiant's copyright designation and this license in any such copy.

License terms