CWE-95 动态执行代码中指令转义处理不恰当(Eval注入) 类弱点 128 条 CVE 漏洞汇总,含 AI 中文分析。
CWE-95 属于代码注入类漏洞,指程序在接收上游输入后,未正确净化代码语法便直接用于动态执行调用(如 eval)。攻击者通常通过构造恶意输入,诱导程序执行任意代码,从而获取系统控制权或窃取数据。开发者应避免使用动态执行函数,若必须使用,需严格对输入进行白名单校验或转义特殊字符,确保仅允许预期的安全代码片段被执行,从而从根源上阻断注入风险。
use CGI qw(:standard); sub config_file_add_key { my ($fname, $key, $arg) = @_; # code to add a field/key to a file goes here } sub config_file_set_key { my ($fname, $key, $arg) = @_; # code to set key to a particular file goes here } sub config_file_delete_key { my ($fname, $key, $arg) = @_; # code to delete key from a particular file goes here } sub handleConfigAction { my ($fname, $action) = @_; my $key = param('key'); my $val = param('val'); # this is super-efficient code, especially if you have to invoke # any one of dozens of different functions! my $code = "config_file_$action_key(\$fnamadd_key(",","); system("/bin/ls");def main(): sum = 0 try: numbers = eval(input("Enter a comma-separated list of numbers: ")) except SyntaxError: print("Error: invalid input") return for num in numbers: sum = sum + num print(f"Sum of {numbers} = {sum}") main()__import__('subprocess').getoutput('rm -r *')| CVE ID | 标题 | CVSS | 风险等级 | Published |
|---|---|---|---|---|
| CVE-2022-38193 | Esri Portal For ArcGis 代码注入漏洞 — Portal for ArcGIS | 6.1 | Medium | 2022-08-16 |
| CVE-2022-36010 | React Editable Json Tree 安全漏洞 — react-editable-json-tree | 10.0 | Critical | 2022-08-15 |
| CVE-2021-33678 | SAP NetWeaver AS ABAP 代码注入漏洞 — SAP NetWeaver AS ABAP (Reconciliation Framework) | 6.5 | - | 2021-07-14 |
| CVE-2021-23277 | Eaton Intelligent Power Manager 代码注入漏洞 — Intelligent Power manager (IPM) | 8.3 | High | 2021-04-13 |
| CVE-2019-9507 | Vertiv Avocent UMG-4000 命令注入漏洞 — Avocent UMG-4000 | 8.3 | High | 2020-03-30 |
| CVE-2020-6650 | Eaton UPS companion software 代码注入漏洞 — UPS Companion Software | 8.3 | High | 2020-03-23 |
| CVE-2020-5256 | BookStack 代码问题漏洞 — BookStack | 7.9 | High | 2020-03-09 |
| CVE-2020-5217 | RubyGems 注入漏洞 — secure_headers | 4.4 | Medium | 2020-01-23 |
CWE-95(动态执行代码中指令转义处理不恰当(Eval注入)) 是常见的弱点类别,本平台收录该类弱点关联的 128 条 CVE 漏洞。