#1153979 libjson-xs-perl: CVE-2026-124536 CVE-2026-124539 CVE-2026-124540 CVE-2026-124541 CVE-2026-129113 CVE-2026-129114 CVE-2026-129115

Package:
src:libjson-xs-perl
Source:
src:libjson-xs-perl
Submitter:
Salvatore Bonaccorso
Date:
2026-11-17 12:17:01 UTC
Severity:
normal
Tags:
#1153979#5
Date:
2026-11-14 14:48:51 UTC
From:
To:
Hi,

The following vulnerabilities were published for libjson-xs-perl.

CVE-2026-124536[0]:
| JSON::XS versions before 4.05 for Perl allow memory exhaustion by
| buffering incremental input past max_size after a NUL byte in
| incr_parse.  The parser appends each chunk to its buffer and
| compares max_size with how far it has progressed, not with the
| buffer length. It treats a NUL byte as the end of the input, so a
| NUL within the first max_size bytes keeps it short of the limit. The
| buffer keeps growing, and incr_skip cannot remove the NUL.  A peer
| streaming data to an incr_parse consumer can exhaust process memory
| regardless of max_size.


CVE-2026-124539[1]:
| JSON::XS versions before 4.05 for Perl leak the decoded key of an
| object rejected for a missing colon in decode_hv.  Unless it is
| short plain ASCII, a quoted key is decoded into a new scalar.
| Nothing frees that scalar when the object is rejected for a missing
| ':' after the key.  A process that keeps running after a failed
| decode retains one key per rejected document, with its size chosen
| by the sender. Repeated requests exhaust process memory.


CVE-2026-124540[2]:
| JSON::XS versions before 4.05 for Perl allow stack exhaustion via
| nested tagged values under allow_tags in decode_tag.  With
| allow_tags, "(" starts a tagged value. Its tag and value are decoded
| recursively, and each can start another tagged value. Unlike arrays
| and objects, this nesting is not counted against max_depth.  A run
| of "(" bytes exhausts the C stack and triggers an uncatchable
| segmentation fault regardless of max_depth.


CVE-2026-124541[3]:
| JSON::XS versions before 4.05 for Perl leak the decoded part of a
| rejected long string in decode_str.  A string is decoded through a
| fixed-size buffer (16 KiB in 4.04), and each time the buffer fills
| its contents move into a new scalar. Nothing frees that scalar when
| the string is then rejected for a control character, an invalid
| escape, malformed UTF-8 or the end of the input.  A process that
| keeps running after a failed decode retains the decoded part of each
| rejected string, with its size chosen by the sender. Repeated
| requests exhaust process memory.


CVE-2026-129113[4]:
| JSON::XS versions from 4.0_00 before 4.05 for Perl corrupt the
| incremental buffer length by chopping past its end in incr_skip
| after a top-level number.  The incremental parser scans any run of
| digits, signs, dots and exponent markers as one number, but the
| decoder stops at the end of a valid number, so the parser keeps an
| offset into bytes it has not decoded. It then empties the buffer
| without clearing those bytes, and a later incr_parse call without
| new input reads them again and moves the offset past the end of the
| buffer. incr_skip, the documented recovery after an error, removes
| that many bytes and the buffer length wraps.  A peer sending input
| such as "1-2" to an incr_parse consumer can make the next read of
| incr_text exit the process through perl's uncatchable out-of-memory
| path.


CVE-2026-129114[5]:
| JSON::XS versions from 3.04 before 4.05 for Perl write one byte past
| a heap buffer when appending a one-byte chunk in incr_parse.  The
| incremental buffer grows to one and a half times the length it must
| hold, with no room reserved for the terminating NUL. For an empty
| buffer and a one-byte chunk that request is one byte, which a buffer
| whose front was removed by earlier decodes can already have, so
| nothing is reallocated and the NUL lands one byte past the
| allocation.  A peer streaming data to an incr_parse consumer,
| choosing how the input is split into reads, can cause a one-byte
| heap out-of-bounds write.


CVE-2026-129115[6]:
| JSON::XS versions from 3.0 before 4.05 for Perl read freed stack
| memory when a FREEZE result's serialisation grows the Perl stack
| under allow_tags in encode_rv.  With allow_tags, an object's FREEZE
| method is called in list context and each returned value is encoded
| through a saved Perl stack pointer. When encoding a returned value
| calls back into Perl, through TO_JSON under convert_blessed or
| another FREEZE, and that callback grows the stack, the stack is
| reallocated while the saved pointer still refers to the freed block.
| Encoding such objects reads freed memory, and encode can return
| undef without an error.


If you fix the vulnerabilities please also make sure to include the
CVE (Common Vulnerabilities & Exposures) ids in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2026-124536
https://www.cve.org/CVERecord?id=CVE-2026-124536
[1] https://security-tracker.debian.org/tracker/CVE-2026-124539
https://www.cve.org/CVERecord?id=CVE-2026-124539
[2] https://security-tracker.debian.org/tracker/CVE-2026-124540
https://www.cve.org/CVERecord?id=CVE-2026-124540
[3] https://security-tracker.debian.org/tracker/CVE-2026-124541
https://www.cve.org/CVERecord?id=CVE-2026-124541
[4] https://security-tracker.debian.org/tracker/CVE-2026-129113
https://www.cve.org/CVERecord?id=CVE-2026-129113
[5] https://security-tracker.debian.org/tracker/CVE-2026-129114
https://www.cve.org/CVERecord?id=CVE-2026-129114
[6] https://security-tracker.debian.org/tracker/CVE-2026-129115
https://www.cve.org/CVERecord?id=CVE-2026-129115

Regards,
Salvatore

#1153979#10
Date:
2026-11-17 12:15:19 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
libjson-xs-perl, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1153979@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Salvatore Bonaccorso <carnil@debian.org> (supplier of updated libjson-xs-perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Tue, 17 Nov 2026 06:58:58 +0100
Source: libjson-xs-perl
Architecture: source
Version: 4.050-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Changed-By: Salvatore Bonaccorso <carnil@debian.org>
Closes: 1153979
Changes:
 libjson-xs-perl (4.050-1) unstable; urgency=medium
 .
   * Team upload.
   * Import upstream version 4.050.
     - Fixes CVE-2026-124536, CVE-2026-124539, CVE-2026-124540,
       CVE-2026-124541, CVE-2026-129113, CVE-2026-129114, CVE-2026-129115.
       (Closes: #1153979)
Checksums-Sha1:
 a43f1d504f815bc4973e8b0e29ef87af27da9f35 2457 libjson-xs-perl_4.050-1.dsc
 2bea01c7e4c9c4c647fb53e08af65c468581ef45 87733 libjson-xs-perl_4.050.orig.tar.gz
 aae2e519a16f9b8bf029055503e53fad7504d98b 5172 libjson-xs-perl_4.050-1.debian.tar.xz
Checksums-Sha256:
 2edea218ec0ad1eb2b015363e89b86324f6b748bf78791336031fca374964f3c 2457 libjson-xs-perl_4.050-1.dsc
 87f08065667a175e8c484d89c51366c08c686609017a68d186fbcbe833f1f958 87733 libjson-xs-perl_4.050.orig.tar.gz
 69700b2c1c6b4aedfa30edf3a668dc75c3136f744c65eee88a65f985933752cb 5172 libjson-xs-perl_4.050-1.debian.tar.xz
Files:
 b85a4b3b88f220c6be8d17a0468b9f5d 2457 perl optional libjson-xs-perl_4.050-1.dsc
 d274bd2b2dda7f49b9709c7de25e02ab 87733 perl optional libjson-xs-perl_4.050.orig.tar.gz
 2bd95679294096aa1c6d90c91ccce01a 5172 perl optional libjson-xs-perl_4.050-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQKmBAEBCgCQFiEERkRAmAjBceBVMd3uBUy48xNDz0QFAmr8P89fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDQ2
NDQ0MDk4MDhDMTcxRTA1NTMxRERFRTA1NENCOEYzMTM0M0NGNDQSHGNhcm5pbEBk
ZWJpYW4ub3JnAAoJEAVMuPMTQ89Ez3gP/RujNr5pNidN+KnvY33Xf7Q6Ni9XYh6/
qmiX2JMbUQ0rKJKfQHzS1eHib/D6cg0NnD0M6J9pcuiZred9FF9k3G41TvCCfyUJ
p36kVe33gLObjfewgw9ky2UkiAeoUxCEOuFyOoL3fYqq4qQeotu4h5wSHNNpQErj
Beu6uOIenUE5tZD7Ic6H1qw4ptP8P+1iHxyCEDYAbDtVO0xk9pMLW/DXCx6/VRRa
8gW8D0P1AeY/i7kc6qGPjsT/6kJtmVYBz3RkmoVfi3RrY0EgTbnpM3M0WrqaLWXP
IBZdGthEGVwvZbkj4vy75lz51ClX/fZ0lagpw/jh1RUABUHI9PDFET9GfjFKSosA
vQvF49t9GJ/kYZekecN5nh3KkB+qX/xP49WQexKz91ZNwKgldcaUr+mNpCHGlxDb
oFNFVPmB7ZypP1NOLi+JVqKLP6miBU3J+Cxrtl5gC9Uv6n+WZmXlLdZn2plYQ6fj
iW+s5p+g4nu0r7oNF4/CbVPMbQZSXFOeTEga/oILwU6uldqAq+S85BYh/LCDrb4v
SSpf37mGEUndBrYwGYgTHDldHNBBdU1Yd0cW39L0hgk478SUpwVaZTf0Bi6oTfwT
A/e16hBA/M2YZqR/Hm436xNEt1I2tK6X66gJdttuovuhQWb58c1CmjGlmKFe9Apj
Aw+EQhUM6QDp
=yFwJ
-----END PGP SIGNATURE-----