CVE-2026-19872: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Description
HTML::FormHandler versions before 0.410000 for Perl allow cross-site scripting via a submitted value rendered unescaped in an error message. The wrappers and renderers that emit a form's errors interpolate the error string straight into HTML with no escaping. Two of the library's own messages, no_match and not_allowed, splice the submitted value into that string, and a failing type constraint puts the rejected value into the message it builds, which _apply_actions hands to add_error. A field declared with a check regexp, a check list or a type constraint reaches those messages, with no custom validator and no non-default configuration. Errors rendered through an application's own escaping template layer rather than the library's rendering roles are not affected. A request over the network that submits markup to such a field gets it back live inside the error span, running script in the victim's origin. Re-rendering a rejected value later gives the stored variant.
CVSS v3.1
Score 6.1medium
Affected software
pkg:github/HTML-FormHandlerRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in HTML::FormHandler (CVE-2026-19872) arises from improper neutralization of input during web page generation (CWE-79). The library's error rendering roles interpolate error messages containing user-submitted values directly into HTML without escaping. This includes messages such as no_match and not_allowed, which splice the submitted value into the error string. Fields with check regexp, check list, or type constraints that fail validation trigger these messages, resulting in reflected XSS. If the application relies on the library's default error rendering, the submitted malicious markup executes in the user's browser. Applications that use custom escaping templates are not vulnerable. The affected versions are all versions before 0.410000.
Potential Impact
An attacker can submit malicious markup in form fields that fail validation, causing the markup to be reflected unescaped in error messages. This leads to cross-site scripting (XSS) attacks, allowing execution of arbitrary scripts in the context of the victim's browser. The vulnerability has a CVSS score of 6.1 (medium severity) with network attack vector, low attack complexity, no privileges required, user interaction required, scope changed, and impacts confidentiality and integrity. There is no indication of known exploits in the wild.
Mitigation Recommendations
No official patch or fix is indicated in the provided data. Users should verify if a newer version beyond 0.410000 is available that addresses this issue. Alternatively, applications can mitigate the vulnerability by using their own escaping template layers for rendering error messages instead of relying on the library's default rendering roles. Until a patch is confirmed, avoid using vulnerable versions or implement custom escaping for error outputs.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-08-14T12:49:19.665Z
- State
- PUBLISHED
Threat ID: 6aa06e9bacd9273b492e1344
Added to database: 09/08/2026, 20:22:51 UTC
Last enriched: 09/16/2026, 01:38:15 UTC
Last updated: 10/21/2026, 13:20:20 UTC
Views: 32
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.