漏洞信息
尽管我们使用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。神龙努力确保数据的准确性,但请您根据实际情况进行核实和判断。
Vulnerability Title
Handlebars.js has JavaScript Injection via AST Type Confusion
Vulnerability Description
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, `Handlebars.compile()` accepts a pre-parsed AST object in addition to a template string. The `value` field of a `NumberLiteral` AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to `compile()` can therefore inject and execute arbitrary JavaScript, leading to Remote Code Execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. Validate input type before calling `Handlebars.compile()`; ensure the argument is always a `string`, never a plain object or JSON-deserialized value. Use the Handlebars runtime-only build (`handlebars/runtime`) on the server if templates are pre-compiled at build time; `compile()` will be unavailable.
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Vulnerability Type
使用不兼容类型访问资源(类型混淆)
Vulnerability Title
handlebars 安全漏洞
Vulnerability Description
handlebars是一款语义化的Web模板系统。 Handlebars 4.7.8及之前版本存在安全漏洞,该漏洞源于Handlebars.compile函数对NumberLiteral AST节点的value字段处理不当,可能导致攻击者注入并执行任意JavaScript代码,引发服务器端远程代码执行。
CVSS Information
N/A
Vulnerability Type
N/A