CVE-2025-12450: Php Html Comment Xss

Unsanitized data is appended into an HTML comment. An attacker can break out of the HTML comment using '-->' and inject arbitrary HTML or JavaScript, leading to Cross-Site Scripting (XSS). Ensure all user-controlled data is properly escaped using `htmlspecialchars` or an equivalent sanitization function before appending it to comments.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0PHPβ
greprules fetch cve-2025-12450-php-html-comment-xss --engine opengrep

Description

Unsanitized data is appended into an HTML comment. An attacker can break out of the HTML comment using '-->' and inject arbitrary HTML or JavaScript, leading to Cross-Site Scripting (XSS). Ensure all user-controlled data is properly escaped using `htmlspecialchars` or an equivalent sanitization function before appending it to comments.