CVE-2026-13051 in Form::Processor::Field::HtmlAreainfo

Summary

by MITRE • 08/13/2026

Form::Processor::Field::HtmlArea versions from 0.06 through 1.162360 for Perl allow attacker selected method dispatch and resource exhaustion via an HTML::Tidy diagnostic that validate passes to add_error as a Locale::Maketext template.

validate runs HTML::Tidy over the submitted markup and passes each resulting message to add_error as its first argument, which add_error hands to the language handle as the Locale::Maketext message key. The default handle's lexicon sets `_AUTO`, so a message that is not a lexicon entry is compiled as a bracket notation template instead of being looked up. Tidy diagnostics quote the offending attribute name or value, so a bracket group in the submitted markup reaches the template position, where the first token of the group names a method called on the language handle and the remaining tokens are its arguments. A group such as `[0]` makes the compile croak, and neither the field nor the handle catches it, so the exception leaves validate. `[sprintf,%2000000000d,7]` reaches CORE::sprintf with an attacker chosen field width.

One submission of crafted markup to an HtmlArea field throws an unhandled exception out of form validation or allocates an arbitrary amount of memory, and an application whose language handle subclass defines side effecting public methods makes those callable with attacker chosen arguments. The other field types pass fixed templates with the submitted value in an argument slot, where it stays inert, and are unaffected.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 08/13/2026

The Form::Processor::Field::HtmlArea module in Perl versions 0.06 through 1.162360 contains a critical vulnerability that combines method dispatch flaws with resource exhaustion capabilities. This vulnerability stems from how the module processes HTML input through HTML::Tidy and subsequently handles diagnostic messages within the validation framework. The core issue manifests when validate() executes HTML::Tidy over submitted markup and passes each diagnostic message to add_error as its first argument. This design creates a dangerous chain of operations where user-controllable data flows directly into Locale::Maketext template processing without proper sanitization or validation.

The technical flaw operates through multiple attack vectors that leverage the module's default Locale::Maketext behavior with the _AUTO lexicon setting. When HTML::Tidy generates diagnostic messages containing quoted attribute names or values from the submitted markup, these strings can contain bracket notation templates that get processed by the language handle. The system's default handling of unknown lexicon entries compiles them as bracket notation templates instead of performing traditional lookup operations. This compilation process treats the first token within the bracket group as a method name to call on the language handle, with subsequent tokens serving as arguments. When attackers craft markup containing sequences like `[sprintf,%2000000000d,7]`, they can trigger arbitrary memory allocation through CORE::sprintf with attacker-controlled field widths, leading to denial of service conditions.

The operational impact of this vulnerability extends beyond simple resource exhaustion to include potential code execution scenarios. When an application uses a language handle subclass that defines side-effecting public methods, attackers can invoke these methods with arbitrary arguments derived from crafted HTML input. This creates a path for remote code execution or privilege escalation depending on the application's security context and the methods available in the language handle implementation. The vulnerability affects only HtmlArea fields because other field types properly sanitize their template arguments by passing submitted values through fixed templates rather than allowing direct user input to influence template compilation. This distinction makes the issue particularly insidious as it can bypass many traditional input validation mechanisms that work against other field types.

The vulnerability aligns with CWE-20: Improper Input Validation and CWE-470: Use of Externally-Controlled Input to Select Classes or Code, while following ATT&CK techniques including T1211: Exploitation for Privilege Escalation and T1499: Endpoint Denial of Service. The attack surface is particularly broad because HTML::Tidy is commonly used in web applications for sanitizing user input, making this vulnerability applicable to numerous Perl-based systems that handle user-generated content through forms. Organizations should immediately update to versions beyond 1.162360 where this vulnerability has been patched, implement strict input validation at multiple layers, and consider applying runtime protections such as memory limits and sandboxing for form processing operations. The fix typically involves sanitizing diagnostic messages before passing them to template processing or ensuring that user-controlled data cannot reach the bracket notation compilation phase of Locale::Maketext handling.

Responsible

CPANSec

Reservation

06/23/2026

Disclosure

08/13/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!