LiquidJS — это шаблонизатор, совместимый с Shopify/GitHub Pages, на чистом JavaScript. До версии 10.27.2 фильтр соединения в src/filters/array.ts вычисляет сложность на основе array.length и длины разделителя вместо общей длины строки, полученной с помощью array.join(sep). Фильтр concat может дешево удвоить массивы ссылок, после чего соединение материализует содержимое ссылки, взимая плату только за количество элементов, что позволяет шаблону значительно превысить настроенный предел памяти.
Родственный фильтр array_to_sentence_string в src/filters/string.ts имеет тот же дефект учета, и созданный шаблон может выделить строку или ограничение памяти процесса V8 и привести к сбою процесса. Эта проблема исправлена в версии 10.27.2.
Показать оригинальное описание (EN)
LiquidJS is a Shopify / GitHub Pages compatible template engine in pure JavaScript. Prior to 10.27.2, the join filter in src/filters/array.ts computes complexity from array.length and separator length instead of the total string length produced by array.join(sep). The concat filter can cheaply double arrays of references, after which join materializes the referenced content while charging only for element count, allowing a template to exceed a configured memoryLimit by a large factor. The sibling array_to_sentence_string filter in src/filters/string.ts has the same accounting defect, and a crafted template can allocate toward V8's string or process memory limit and crash the process. This issue is fixed in version 10.27.2.
Характеристики атаки
Последствия
Строка CVSS v3.1