توضیح (فارسی)
NGINX Unit 1.29.0 تا 1.35.0 و شاخه FreeUnit قبل از 1.37.2 حاوی آسیبپذیری تزریق دستور سیستم عامل در ابزار کمکی tools/setup-unit هستند، جایی که unit_cmd() خط دستور unitd را از متن داخل براکت در عنوان هر پردازسی که خروجی ps آن حاوی 'unit: main' است، بدون بررسی مالکیت آن پردازش میگیرد. توابع unit_sock_find() و unit_ctl_welcome() آن متن را به عنوان دستور اجرا میکنند، و از نسخه 1.31.0 تابع unit_restart() آن را به eval میدهد. کاربران محلی بدون مزیت میتوانند پردازسی با عنوان مشابه پردازش اصلی unitd راهاندازی کنند، به طوری که وقتی مدیر setup-unit را به عنوان root اجرا میکند، مثلاً 'setup-unit ctl' بدون -s، 'sock find' یا 'restart'، برنامه ها یا دستورات shell انتخاب شده توسط مهاجم به عنوان root اجرا میشود.
Original description (English)
NGINX Unit 1.29.0 through 1.35.0 and the FreeUnit fork before 1.37.2 contain an OS command injection vulnerability in the tools/setup-unit helper, where unit_cmd() takes the unitd command line from the bracketed text in the title of any process whose ps output contains 'unit: main', without checking who owns that process. unit_sock_find() and unit_ctl_welcome() run that text as a command, and from 1.31.0 unit_restart() passes it to eval. Local unprivileged users can start a process titled like the unitd main process, so that an administrator who runs setup-unit as root, for example 'setup-unit ctl' without -s, 'sock find' or 'restart', executes a program or shell commands chosen by the attacker as root.