UltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Prior to 5.12.1, when ujson.dump() writes to a file-like object and the write operation raises an exception, the serialized JSON string object is not decremented, leaking memory. Each failed write operation leaks the full size of the serialized payload. This vulnerability is fixed in 5.12.1.
UltraJSON versions before 5.12.1 leak memory when ujson.dump() encounters write exceptions to file-like objects, with each failed write leaking the full serialized payload size. Organizations using affected versions in production systems may experience memory exhaustion and denial of service conditions.
يؤثر هذا الضعف على مكتبة UltraJSON المستخدمة لترميز وفك ترميز JSON بسرعة عالية في Python. عندما تفشل عملية الكتابة إلى كائن يشبه الملف، لا يتم تحرير كائن السلسلة المسلسلة، مما يؤدي إلى تسرب الذاكرة التراكمي. يمكن للمهاجمين استغلال هذا من خلال تحفيز عمليات كتابة فاشلة متكررة لاستنزاف موارد النظام.
إصدارات UltraJSON السابقة للإصدار 5.12.1 تسرب الذاكرة عند حدوث استثناءات الكتابة في ujson.dump()، حيث يسرب كل عملية كتابة فاشلة حجم الحمل المسلسل بالكامل. قد تواجه المنظمات التي تستخدم الإصدارات المتأثرة استنزاف الذاكرة وحالات رفض الخدمة.
Upgrade UltraJSON to version 5.12.1 or later immediately. Review all Python applications using ujson.dump() for file operations and implement proper exception handling with resource cleanup. Monitor memory usage in production systems and implement rate limiting on file write operations.
قم بترقية UltraJSON إلى الإصدار 5.12.1 أو أحدث فوراً. راجع جميع تطبيقات Python التي تستخدم ujson.dump() لعمليات الملفات وطبق معالجة استثناءات صحيحة مع تنظيف الموارد. راقب استخدام الذاكرة في أنظمة الإنتاج وطبق تحديد معدل على عمليات كتابة الملفات.