UltraJSON 4.2.0 before 6.0.0 contains a memory leak in Object_beginTypeContext() 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.
https://github.com/ultrajson/ultrajson/security/advisories/GHSA-8g3h-c45c-7pg3
https://github.com/ultrajson/ultrajson/releases/tag/6.0.0
https://github.com/ultrajson/ultrajson/commit/12492c2deb0e60ac66da40dc15f06ba967ed3e0a
https://github.com/ultrajson/ultrajson/blob/5.13.0/src/ujson/python/objToJSON.c#L543-L590