Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-cxf7-qrc5-9446

Опубликовано: 01 мар. 2022
Источник: github
Github: Прошло ревью
CVSS3: 9.8

Описание

Remote shell execution vulnerability in image_processing

Impact

When using the #apply method from image_processing to apply a series of operations that are coming from unsanitized user input, this allows the attacker to execute shell commands:

ImageProcessing::Vips.apply({ system: "echo EXECUTED" }) #>> EXECUTED

This method is called internally by Active Storage variants, so Active Storage is vulnerable as well.

Patches

The vulnerability has been fixed in version 1.12.2 of image_processing.

Workarounds

If you're processing based on user input, it's highly recommended that you always sanitize the user input, by allowing only a constrained set of operations. For example:

operations = params[:operations] .map { |operation| [operation[:name], *operation[:value]] } .select { |name, *| name.to_s.include? %w[resize_to_limit strip ...] } # sanitization ImageProcessing::Vips.apply(operations)

Пакеты

Наименование

image_processing

rubygems
Затронутые версииВерсия исправления

< 1.12.2

1.12.2

EPSS

Процентиль: 75%
0.00877
Низкий

9.8 Critical

CVSS3

Дефекты

CWE-20
CWE-78

Связанные уязвимости

CVSS3: 9.8
ubuntu
почти 4 года назад

image_processing is an image processing wrapper for libvips and ImageMagick/GraphicsMagick. Prior to version 1.12.2, using the `#apply` method from image_processing to apply a series of operations that are coming from unsanitized user input allows the attacker to execute shell commands. This method is called internally by Active Storage variants, so Active Storage is vulnerable as well. The vulnerability has been fixed in version 1.12.2 of image_processing. As a workaround, users who process based on user input should always sanitize the user input by allowing only a constrained set of operations.

CVSS3: 9.8
nvd
почти 4 года назад

image_processing is an image processing wrapper for libvips and ImageMagick/GraphicsMagick. Prior to version 1.12.2, using the `#apply` method from image_processing to apply a series of operations that are coming from unsanitized user input allows the attacker to execute shell commands. This method is called internally by Active Storage variants, so Active Storage is vulnerable as well. The vulnerability has been fixed in version 1.12.2 of image_processing. As a workaround, users who process based on user input should always sanitize the user input by allowing only a constrained set of operations.

CVSS3: 9.8
debian
почти 4 года назад

image_processing is an image processing wrapper for libvips and ImageM ...

CVSS3: 9.8
fstec
почти 4 года назад

Уязвимость программного средства ImageProcessing, существующая из-за непринятия мер по нейтрализации специальных элементов, используемых в команде операционной системы, позволяющая нарушителю выполнить команды оболочки

EPSS

Процентиль: 75%
0.00877
Низкий

9.8 Critical

CVSS3

Дефекты

CWE-20
CWE-78