-
CVSS Score
-The vulnerability stems from improper buffer size calculation in encode_unicode() when handling UCS-4 encoded Unicode. The patch replaces a fixed 6-byte-per-character multiplier with a context-aware expandsize (10 for UCS-4, 6 otherwise), and removes unsafe dynamic buffer resizing logic. The test case in jsontest.py demonstrates how specific Unicode sequences trigger overflow. The direct modification of buffer allocation logic in the commit confirms this function's role in the vulnerability.
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| python-cjson | pip | <= 1.0.5 | 1.0.5.1 |
Ongoing coverage of React2Shell