Changes for version 4.82 - 2026-11-16

  • Security fixes, reported by Albert Gierlach (rivit):
    • encode: JSON_TYPE_BOOL of a reference to a scalar other than 0 or 1 crashed (NULL stash) instead of croaking.
    • encode: JSON_TYPE_FLOAT with allow_bignum and an integer value overflowed the buffer by the appended ".0".
    • encode: convert_blessed no longer expands Math::BigFloat objects with a huge exponent into digits (memory exhaustion).
    • decode: free the partial string on errors (leak of ~16KB per document with strings > 16KB).
    • decode: free enclosing arrays and hashes when a filter_json_object or filter_json_single_key_object callback dies (leak).
    • decode: -9223372036854775808 negated IV_MIN (undefined behaviour).
    • incr_parse: a NUL byte between values is now an error and no longer stalls the parser while the buffer grows forever.
    • incr_parse: keep incr_pos consistent when the downgrade fails with wide characters, and never underflow it when the incremental scanner and the decoder disagree (allow_barekey). Fixes out-of-bounds writes in incr_parse after incr_skip.
  • t/10_pc_keysort fix for perls older then 5.20, introduced with 4.81 (GH #262 eserte)

Documentation

Cpanel::JSON::XS commandline utility

Modules

cPanel fork of JSON::XS, fast and correct serializing
true and false values
Type support for JSON encode