همهٔ گزارش‌ها
زیاد

handlebars.java FileTemplateLoader Path Traversal

متن اصلی

نسخه‌های متأثر

نسخه‌های متأثر
< 4.5.2
نسخهٔ اصلاح‌شده
4.5.2

بهره‌برداری

CVE-2026-55760

احتمال بهره‌برداری در ۳۰ روز آینده: 0.53%

FIRST EPSS · ۱۴۰۵/۰۸/۲۷

شرح آسیب‌پذیری

Impact

Any application that passes user-controlled input to Handlebars.compile() using a FileTemplateLoader (or ClassPathTemplateLoader) is vulnerable to arbitrary file read. This is a realistic attack surface for web applications that use template names from URL path parameters, request parameters, or other user-controlled sources.

Patches

com.github.jknack:handlebars:4.5.2

Workarounds

Validate template name is derived from user input.

if (!file.getPath().startsWith(new File(prefix).getCanonicalPath())) {
        throw new IOException("Path traversal attempt detected: " + location);
}

پیوندها

گزارش‌دهندگان

  • dyingman1