protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.5.6 and 8.0.2, protobufjs generated JavaScript for toObject conversion could include an unsafe expression derived from a schema-controlled bytes field default value. A crafted descriptor with a non-string default value for a bytes field could cause attacker-controlled code to be emitted into the generated conversion function. This vulnerability is fixed in 7.5.6 and 8.0.2.
protobufjs versions before 7.5.6 and 8.0.2 generate unsafe JavaScript code from crafted protobuf descriptors, allowing attackers to inject arbitrary code through malicious bytes field default values. Organizations using affected versions risk remote code execution when processing untrusted protobuf schemas.
يؤثر هذا الثغر على مكتبة protobufjs التي تُستخدم لترجمة تعريفات protobuf إلى دوال JavaScript. يمكن للمهاجمين استغلال معالجة القيم الافتراضية غير الآمنة لحقول البايتات لحقن وتنفيذ كود تعسفي في بيئة التطبيق.
إصدارات protobufjs السابقة للإصدار 7.5.6 و 8.0.2 تولد كود JavaScript غير آمن من واصفات protobuf المصنوعة، مما يسمح للمهاجمين بحقن كود تعسفي من خلال قيم افتراضية ضارة لحقول البايتات. تواجه المنظمات التي تستخدم الإصدارات المتأثرة خطر تنفيذ كود بعيد عند معالجة مخططات protobuf غير موثوقة.
Upgrade protobufjs to version 7.5.6 or 8.0.2 or later immediately. Validate and sanitize all protobuf schema sources before compilation. Implement strict input validation for protobuf descriptors from untrusted sources. Review generated JavaScript code for suspicious patterns before deployment.
قم بترقية protobufjs إلى الإصدار 7.5.6 أو 8.0.2 أو أحدث على الفور. تحقق من صحة وتنظيف جميع مصادر مخطط protobuf قبل الترجمة. تطبيق التحقق الصارم من المدخلات لواصفات protobuf من مصادر غير موثوقة. مراجعة الكود JavaScript المُنشأ بحثاً عن أنماط مريبة قبل النشر.