CVE-2026-145573: UltraJSON 4.2.0 before 6.0.0 Memory Leak via ujson.dumps() default Handler

Published Dec 5, 2026
·
Updated

UltraJSON 4.2.0 before 6.0.0 contains a memory leak in ObjectbeginTypeContext() that fails to release objects returned by a caller-supplied default handler. Attackers who can repeatedly trigger encoding of values whose default handler returns non-serializable objects leak one object per failed call, gradually exhausting process memory.

Affected Software

1 affected component
pypi/ujson>=4.2.0<6.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 6.0.0

Event History

Dec 5, 2026
CVE Published
via MITRE·02:43 PM
Data Sourced
via MITRE·02:43 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:17 PM
DescriptionSeverityWeakness
Event
via NVD·03:17 PM

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using UltraJSON versions 4.2.0 through versions before 6.0.0 are affected when they use ujson.dumps() with a caller-supplied default handler. The leak requires that handler to return a non-serializable object.

2

What does an attacker need to do to exploit the leak?

An attacker must be able to repeatedly cause encoding of values that reach the caller-supplied default handler and cause it to return non-serializable objects. Each failed encoding call leaks one object, so exploitation depends on repeated triggering over time.

3

Is a default ujson.dumps() configuration affected?

The available information identifies the vulnerable path as a caller-supplied default handler. It does not indicate that calls without such a handler trigger this leak.

4

What is the remediation?

Upgrade UltraJSON to version 6.0.0 or later. If upgrading is not immediately possible, avoid or restrict untrusted requests that can repeatedly invoke a default handler returning non-serializable objects.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203