CWE-177: Improper Handling of URL Encoding (Hex Encoding)

Variant Draft Simple

CWE版本: 4.18

更新日期: 2025-09-09

弱点描述

The product does not properly handle when all or part of an input has been URL encoded.

常见后果

影响范围: Integrity

技术影响: Unexpected State

潜在缓解措施

阶段: Architecture and Design

策略: Input Validation

描述: Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.

阶段: Implementation

策略: Input Validation

阶段: Implementation

策略: Input Validation

描述: 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.

观察示例

参考: CVE-2000-0900

Hex-encoded path traversal variants - "%2e%2e", "%2e%2e%2f", "%5c%2e%2e"

参考: CVE-2005-2256

Hex-encoded path traversal variants - "%2e%2e", "%2e%2e%2f", "%5c%2e%2e"

参考: CVE-2004-2121

Hex-encoded path traversal variants - "%2e%2e", "%2e%2e%2f", "%5c%2e%2e"

参考: CVE-2004-0280

"%20" (encoded space)

参考: CVE-2003-0424

"%20" (encoded space)

参考: CVE-2001-0693

"%20" (encoded space)

参考: CVE-2001-0778

"%20" (encoded space)

参考: CVE-2002-1831

Crash via hex-encoded space "%20".

参考: CVE-2000-0671

"%00" (encoded null)

参考: CVE-2004-0189

"%00" (encoded null)

参考: CVE-2002-1291

"%00" (encoded null)

参考: CVE-2002-1031

"%00" (encoded null)

参考: CVE-2001-1140

"%00" (encoded null)

参考: CVE-2004-0760

"%00" (encoded null)

参考: CVE-2002-1025

"%00" (encoded null)

参考: CVE-2002-1213

"%2f" (encoded slash)

参考: CVE-2004-0072

"%5c" (encoded backslash) and "%2e" (encoded dot) sequences

参考: CVE-2004-0847

"%5c" (encoded backslash)

参考: CVE-2002-1575

"%0a" (overlaps CRLF)

引入模式

阶段 说明
Implementation -

适用平台

编程语言
Not Language-Specific (Undetermined)

分类映射

分类名称 条目ID 条目名称 映射适配度
PLOVER - URL Encoding (Hex Encoding) -
关键信息

CWE ID: CWE-177

抽象级别: Variant

结构: Simple

状态: Draft

相关弱点
相关攻击模式
CAPEC-120 CAPEC-468 CAPEC-64 CAPEC-72