CWE-23 相对路径遍历 类弱点 361 条 CVE 漏洞汇总,含 AI 中文分析。
CWE-23 相对路径遍历漏洞源于软件未正确过滤外部输入中的“..”序列,导致构造的文件路径突破受限目录边界。攻击者通常利用此缺陷读取或修改系统敏感文件,获取未授权访问权限。开发者应避免直接使用用户输入拼接路径,需通过白名单验证、规范化路径或限制访问范围来彻底中和危险字符,从而防止路径逃逸。
http://example.com/get-files.jsp?file=report.pdf http://example.com/get-page.php?home=aaa.html http://example.com/some-page.asp?page=index.htmlhttp://example.com/get-files?file=../../../../somedir/somefile http://example.com/../../../../etc/shadow http://example.com/get-files?file=../../../../etc/passwdmy $dataPath = "/users/cwe/profiles"; my $username = param("user"); my $profilePath = $dataPath . "/" . $username; open(my $fh, "<", $profilePath) || ExitError("profile read error: $profilePath"); print "<ul>\n"; while (<$fh>) { print "<li>$_</li>\n"; } print "</ul>\n";../../../etc/passwd| CVE ID | 标题 | CVSS | 风险等级 | Published |
|---|---|---|---|---|
| CVE-2012-5972 | SpecView Web Server目录遍历漏洞 — SpecView | 7.5 | - | 2013-01-17 |
CWE-23(相对路径遍历) 是常见的弱点类别,本平台收录该类弱点关联的 361 条 CVE 漏洞。