Description
HTML::Bare versions through 0.04 for Perl will hang in an infinite loop when parsing malformed attributes.

The parserc_parse function never advances the attribute-parse state cursor on certain malformed attribute forms, looping forever.

Nameless attributes such as "<a ='c'>" or unbalanced quotes "<a b='''''''c'>" can trigger this condition.

Note that the latest version available on CPAN is version 0.02. Newer versions are available on the git repository.
Published: 2026-07-16
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is a resource exhaustion flaw in the HTML::Bare parser_c_parse function, identified as CWE‑835. When encountering certain malformed attribute forms—such as nameless attributes (e.g., "<a ='c'>") or unbalanced quotes (e.g., "<a b='''''''c'>")—the parser fails to advance its internal cursor and loops forever. This infinite loop effectively stalls the parsing operation, causing the application to become unresponsive and leading to a denial of service. Since the flaw resides in the core parsing engine, the input HTML can trigger the crash by injecting malicious attributes, potentially through any interface that feeds untrusted HTML into the module.

Affected Systems

Perl modules HTML::Bare version 0.04 and earlier are affected. The latest CPAN release at the time of reporting is 0.02, but newer development builds are available in the module’s source repository. Systems that install or use these versions of HTML::Bare—particularly those exposing user-supplied HTML content—are at risk.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity, and the EPSS score of <1% suggests exploitation probability is very low at present. The vulnerability is not listed in the CISA KEV catalog. Based on the description, it is inferred that an attacker could deliver malicious attribute strings—such as nameless or unbalanced quotes—to cause the infinite loop. This attack could be executed via any interface that processes untrusted HTML input, potentially leading to denial of service. Because the flaw resides in the parsing engine, remediation requires a code patch rather than runtime configuration.

Generated by OpenCVE AI on July 31, 2026 at 01:43 UTC.

Remediation

Vendor Workaround

Apply the patch.


OpenCVE Recommended Actions

  • Apply the official patch for HTML::Bare from https://github.com/nanoscopic/perl-HTML-Bare/pull/1 or the patch file at https://security.metacpan.org/patches/H/HTML-Bare/0.02/CVE-2026-13397-r1.patch.
  • Upgrade the module to a version newer than 0.04, which is available from the source repository.
  • Sanitize or validate attribute inputs before passing them to HTML::Bare, or temporarily disable parsing of potentially malformed attributes to prevent the infinite loop.

Generated by OpenCVE AI on July 31, 2026 at 01:43 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 23 Jul 2026 22:45:00 +0000

Type Values Removed Values Added
First Time appeared Codechild
Codechild html::bare
Vendors & Products Codechild
Codechild html::bare

Fri, 17 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 16 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Description HTML::Bare versions through 0.04 for Perl will hang in an infinite loop when parsing malformed attributes. The parserc_parse function never advances the attribute-parse state cursor on certain malformed attribute forms, looping forever. Nameless attributes such as "<a ='c'>" or unbalanced quotes "<a b='''''''c'>" can trigger this condition. Note that the latest version available on CPAN is version 0.02. Newer versions are available on the git repository.
Title HTML::Bare versions through 0.04 for Perl will hang in an infinite loop when parsing malformed attributes
Weaknesses CWE-835
References

Subscriptions

Codechild Html::bare
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-17T13:30:45.877Z

Reserved: 2026-06-26T08:25:15.552Z

Link: CVE-2026-13397

cve-icon Vulnrichment

Updated: 2026-07-16T19:27:56.736Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T01:45:06Z

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')