Security Advisories (2)
CVE-2006-10002 (2026-03-19)

XML::Parser versions through 2.45 for Perl could overflow the pre-allocated buffer size cause a heap corruption (double free or corruption) and crashes. A :utf8 PerlIO layer, parse_stream() in Expat.xs could overflow the XML input buffer because Perl's read() returns decoded characters while SvPV() gives back multi-byte UTF-8 bytes that can exceed the pre-allocated buffer size. This can cause heap corruption (double free or corruption) and crashes.

CVE-2006-10003 (2026-03-19)

XML::Parser versions through 2.47 for Perl has an off-by-one heap buffer overflow in st_serial_stack. In the case (stackptr == stacksize - 1), the stack will NOT be expanded. Then the new value will be written at location (++stackptr), which equals stacksize and therefore falls just outside the allocated buffer. The bug can be observed when parsing an XML file with very deep element nesting

Changes for version 2.17 - 1998-12-13

  • Replaced uses of malloc, realloc, and free with New, Renew, and Safefree respectively
  • In Expat.pm, fixed methods in_element and within_element to work correctly with namespaces.
  • xmlfilter - Substitute quoted equivalents for special characters in attribute values.
  • position_in_context was off by one line when position was at the end of line.
  • For the context methods in Expat.pm, do the right thing when the context list is empty.
  • Added methods xpcroak and xpcarp to Expat.
  • Alberto Accomazzi <alberto@cfa0.harvard.edu> noted that perl releases 5.005_5* (the pre 5.006 development versions) won't accept sv_undef (and related constants) anymore and we have to switch to PL_sv_...
  • Alberto also reported a warning in the newer versions of IO::Handle about input_record_separator not being treated on a per-handle basis.
  • Fixed bug that Jon Udell <udell@top.monad.net> reported in Stream style: Text handler most of the time didn't see proper context.
  • Added XML::Parser::Expat::load_encoding function and support for external encodings.

Modules

Lowlevel access to James Clark's expat XML parser
A perl module for parsing XML documents

Provides

in Parser.pm
in Expat/Expat.pm
in Parser.pm
in Parser.pm
in Parser.pm
in Parser.pm