Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
Network-reachable if the app parses untrusted HTML (AV:N/AC:L/PR:N/UI:N), but a small bounded over-read yields only limited disclosure (C:L) and a likely crash (A:L), not high impact.
Primary rating from Vendor (CPANSec).
CVSS VectorVendor: CPANSec
Lifecycle Timeline
5DescriptionCVE.org
HTML::Bare versions through 0.04 for Perl have an unbounded character lookahead.
The parserc_parse function attempts to check for multicharacter strings such as "<![CDATA" or element terminators such as ">" without checking that the offsets are within the buffer.
Truncated strings such as "<a/" can trigger an out-of-bounds read.
Note that the latest version available on CPAN is version 0.02. Newer versions are available on the git repository.
AnalysisAI
Out-of-bounds read in the HTML::Bare Perl parsing module (versions through 0.04) lets an attacker who supplies truncated or malformed HTML - such as the string "<a/" - force the C-based parserc_parse routine to read past the end of the input buffer. Because the parser performs multi-character lookahead for tokens like "<![CDATA" and element terminators ">" without bounds checks, adjacent heap memory can be disclosed or the process can crash. No public exploit was identified at time of analysis, but an upstream fix (GitHub PR #2) and per-version patches are available.
Technical ContextAI
HTML::Bare is a Perl module whose parsing hot-path is implemented in C (parser.c) for speed, exposing it to classic memory-safety bugs. The root cause is CWE-125 (Out-of-Bounds Read): parserc_parse dereferences fixed offsets from the current cursor - e.g. *(cpos+7)/*(cpos+8) when matching "<![CDATA[", and blind cpos+=2 advances that assume the next byte is '>' - without first confirming those offsets fall inside the NUL-terminated buffer. When input is truncated (e.g. "<a/" or a tag whose assumed '>' is actually the NUL terminator), the cursor advances past the string boundary and subsequent reads touch memory beyond the allocation. The CPE cpe:2.3:a:codechild:html::bare identifies the affected package; the fix adds the missing terminator/NUL checks (require the full "<![CDATA[" before skipping 9 bytes, and only skip the assumed '>' when *(cpos+1) is non-NUL).
RemediationAI
Patch available per vendor advisory: apply the CPANSec-published fixes rather than waiting for a tagged release - https://security.metacpan.org/patches/H/HTML-Bare/0.02/CVE-2026-57073-r1.patch for CPAN 0.02 and https://security.metacpan.org/patches/H/HTML-Bare/0.04/CVE-2026-57073-r2.patch for the git 0.04 line, both corresponding to upstream fix PR https://github.com/nanoscopic/perl-HTML-Bare/pull/2. Because no fixed version is published to CPAN, this is best described as an upstream fix (PR/patch) rather than an independently confirmed released version, so pin to the patched source or vendor the corrected parser.c into your build. If you cannot patch immediately, the practical compensating control is to stop passing untrusted input to the C parser: validate/size-cap input length and reject truncated tags before parsing, or switch to the pure-Perl parse path if your integration exposes one (trade-off: slower parsing), and isolate any service that parses attacker-controlled HTML so a crash cannot cascade. See the oss-security advisory https://seclists.org/oss-sec/2026/q3/155 for coordination details.
Heap memory disclosure in the Perl HTML::Gumbo module before 0.19 lets remote attackers leak bounded chunks of process h
The html.Parse function in golang.org/x/net/html has an infinite parsing loop when processing certain inputs, which can
Session::Cookie in the HTML::EP module 0.2011 for Perl does not properly use the Storable::thaw function, which allows r
Denial of service in HTML::Bare through version 0.04, a Perl XML/HTML parsing module, allows remote unauthenticated atta
Heap information disclosure in HTML::Entities for Perl (versions before 3.84) allows remote attackers to leak adjacent h
Cross-site scripting in SWC's HTML minifier allows attacker-controlled JSON data embedded in application/json and applic
Html contains a vulnerability that allows attackers to denial of service (DoS) if an attacker provides specially crafted
Same weakness CWE-125 – Out-of-bounds Read
View allSame technique Buffer Overflow
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-44965
GHSA-682p-jxjc-9j4v