CWE

Common Weakness Enumeration

A Community-Developed List of Software & Hardware Weakness Types

2021 CWE最重要的硬件弱点
CWE前25个最危险的弱点
>CWEList>CWE- Individual Dictionary Definition (4.9)
ID

CWE-35: Path Traversal: '.../...//'

弱点ID:35
抽象:Variant
结构:简单的
View customized information:
+Description
该软件使用外部输入来构建应在限制目录内的路径名,但不能正确地中和'.../... //(双点斜线斜线)序列,可以分辨到外面的位置该目录。
+Extended Description

This allows attackers to traverse the file system to access files or directories that are outside of the restricted directory.

The '.../...//' manipulation is useful for bypassing some path traversal protection schemes. If "../" is filtered in a sequential fashion, as done by some regular expression engines, then ".../...//" can collapse into the "../" unsafe value (CWE-182). Removing the first "../" yields "....//"; the second removal yields "../". Depending on the algorithm, the software could be susceptible toCWE-34但不是CWE-35, or vice versa.

+关系
部分帮助该表显示了与该弱点相关的弱点和高级类别。这些关系定义为childof,parentof,ementof,并深入了解可能存在于较高和较低抽象水平的类似项目。此外,定义了诸如Peerof和Canalsobe之类的关系,以显示用户可能想要探索的类似弱点。
+Relevant to the view "Research Concepts" (CWE-1000)
自然 Type ID 名称
Childof 根据根据- a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource. 23 Relative Path Traversal
CanFollow 根据根据- a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource. 182 数据崩溃成不安全的值
+介绍模式
部分帮助引言的不同模式提供了有关如何以及何时引入这种弱点的信息。该阶段识别可能发生介绍的生命周期中的一个点,而音符提供了与给定阶段中引言有关的典型情况。
Phase 笔记
Implementation
+适用的平台
部分帮助该清单显示了可能出现的弱点的可能区域。这些可能适用于特定的命名语言,操作系统,体系结构,范式,技术或一类此类平台。该平台与给定弱点出现在该实例的频率一起列出。

语言

班级:不是特定语言的(不确定的患病率)

+常见后果
部分帮助该表指定与弱点相关的不同个人后果。该范围确定了违反的应用程序安全区域,而影响描述了如果对手成功利用这一弱点,就会产生负面的技术影响。其可能性提供了有关预期相对于列表中其他后果的特定后果的可能性的信息。例如,可能会利用弱点来实现一定的影响,但很可能会利用它来实现不同的影响。
范围 Impact 可能性
Confidentiality
Integrity

技术影响:读取文件或目录;修改文件或目录

+Observed Examples
Reference Description
chain: ".../...//" bypasses protection mechanism using regexp's that remove "../" resulting in collapse into an unsafe value "../" (CWE-182)和由此产生的路径遍历。
".../....///" bypasses regexp's that remove "./" and "../"
+Potential Mitigations

Phase: Implementation

策略:输入验证

假设所有输入都是恶意的。使用“接受已知的好的”输入验证策略,即使用严格符合规格的可接受输入列表。拒绝任何不严格符合规格的输入,或将其转换为可以做的事物。

执行输入验证时,请考虑所有潜在的相关属性,包括长度,输入类型,可接受值的全部范围,缺失或额外的输入,语法,跨相关字段的一致性以及符合业务规则的一致性。作为业务规则逻辑的一个示例,“船”可能在句法上有效,因为它仅包含字母数字字符,但是如果仅预期输入包含诸如“红色”或“蓝色”之类的颜色,则无效。

不要仅仅依靠寻找恶意或畸形的输入。这可能会错过至少一个不良的输入,尤其是如果代码的环境发生变化。这可以为攻击者提供足够的空间来绕过预期的验证。但是,拒绝者对于检测潜在攻击或确定哪些投入是如此畸形以至于应直接拒绝。

When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such asCWE-23,并排除目录分离器,例如“/”以避免CWE-36。使用允许文件扩展名的列表,这将有助于避免CWE-434

不要仅仅依靠去除潜在危险字符的过滤机制。这等同于派符者,这可能是不完整的(CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would be removed from the original string, but the remaining characters would still form the "../" string.

Effectiveness: High

Phase: Implementation

策略:输入验证

Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
+Memberships
部分帮助This MemberOf Relationships table shows additional CWE Categories and Views that reference this weakness as a member. This information is often useful in understanding where a weakness fits within the context of external information sources.
自然 Type ID 名称
MemberOf CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. 981 SFP次级群集:路径遍历
MemberOf CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. 1345 OWASP Top Ten 2021 Category A01:2021 - Broken Access Control
+Taxonomy Mappings
映射的分类名称 节点ID Fit 映射的节点名称
plover '.../...//'
软件故障模式 SFP16 路径遍历
+内容历史记录
+Submissions
Submission Date 提交者 Organization
2006-07-19 plover
+修改
修改日期 Modifier Organization
2008-07-01 埃里克·达奇(Eric Dalci) Cigital
updated Potential_Mitigations, Time_of_Introduction
2008-09-08 CWE内容团队 MITER
更新的描述, Relationships, Taxonomy_Mappings
2008-10-14 CWE内容团队 MITER
更新的描述
2008-11-24 CWE内容团队 MITER
更新了观察到的examples
2009-07-27 CWE内容团队 MITER
updated Potential_Mitigations
2010-06-21 CWE内容团队 MITER
更新的描述,势_MITIGATIONS
2010-12-13 CWE内容团队 MITER
updated Relationships
2011-03-29 CWE内容团队 MITER
updated Potential_Mitigations
2011-06-01 CWE内容团队 MITER
updated Common_Consequences
2012-05-11 CWE内容团队 MITER
updated Relationships
2014-07-30 CWE内容团队 MITER
updated Relationships, Taxonomy_Mappings
2017-11-08 CWE内容团队 MITER
updated Applicable_Platforms
2020-02-24 CWE内容团队 MITER
updated Potential_Mitigations, Relationships
2020-06-25 CWE内容团队 MITER
updated Potential_Mitigations
2021-03-15 CWE内容团队 MITER
updated Potential_Mitigations
2021-10-28 CWE内容团队 MITER
updated Relationships
+先前的输入名称s
Change Date 先前的输入名称
2008-04-11 Path Issue - Doubled Triple Dot Slash - '.../...//'
More information is available — Please select a different filter.
页面最后更新:October 13, 2022