CWE

Common Weakness Enumeration

社区开发的软件和硬件弱点类型清单

2021 CWE Most Important Hardware Weaknesses
CWE Top 25 Most Dangerous Weaknesses
Home>CWE List> CWE- Individual Dictionary Definition (4.10)
ID

CWE-472:假定的可免除Web参数的外部控制

Weakness ID: 472
Abstraction:Base
Structure:Simple
View customized information:
+Description
The web application does not sufficiently verify inputs that are assumed to be immutable but are actually externally controllable, such as hidden form fields.
+Extended Description

If a web product does not properly protect assumed-immutable values from modification in hidden form fields, parameters, cookies, or URLs, this can lead to modification of critical data. Web applications often mistakenly make the assumption that data passed to the client in hidden fields or cookies is not susceptible to tampering. Improper validation of data that are user-controllable can lead to the application processing incorrect, and often malicious, input.

For example, custom cookies commonly store session data or persistent data across sessions. This kind of session data is normally involved in security related decisions on the server side, such as user authentication and access control. Thus, the cookies might contain sensitive data such as user credentials and privileges. This is a dangerous practice, as it can often lead to improper reliance on the value of the client-provided cookie by the server side application.

+Alternate Terms
Assumed-Immutable Parameter Tampering
+Relationships
Section HelpThis table shows the weaknesses and high level categories that are related to this weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as PeerOf and CanAlsoBe are defined to show similar weaknesses that the user may want to explore.
+Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name
ChildOf Base基础 - 仍然主要独立于资源或技术的弱点,但有足够的细节来提供特定的检测和预防方法。基本水平的弱点通常用以下维度的2或3来描述问题:行为,财产,技术,语言和资源。 471 Modification of Assumed-Immutable Data (MAID)
ChildOf Class班级 - 以非常抽象的方式描述的弱点,通常与任何特定的语言或技术无关。比支柱弱点更具体,但比基本弱点更一般。班级弱点通常用以下维度的1或2来描述问题:行为,属性和资源。 642 External Control of Critical State Data
CanFollow Base基础 - 仍然主要独立于资源或技术的弱点,但有足够的细节来提供特定的检测和预防方法。基本水平的弱点通常用以下维度的2或3来描述问题:行为,财产,技术,语言和资源。 656 通过默默无闻依靠安全性
Section HelpThis table shows the weaknesses and high level categories that are related to this weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as PeerOf and CanAlsoBe are defined to show similar weaknesses that the user may want to explore.
+Relevant to the view "Software Development" (CWE-699)
Nature Type ID Name
MemberOf 类别类别- a CWE entry that contains a set of other entries that share a common characteristic. 19 Data Processing Errors
Section HelpThis table shows the weaknesses and high level categories that are related to this weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to similar items that may exist at higher and lower levels of abstraction. In addition, relationships such as PeerOf and CanAlsoBe are defined to show similar weaknesses that the user may want to explore.
+与“建筑概念”(CWE-1008)有关
Nature Type ID Name
MemberOf 类别类别- a CWE entry that contains a set of other entries that share a common characteristic. 1019 验证输入
+Modes Of Introduction
Section HelpThe different Modes of Introduction provide information about how and when this weakness may be introduced. The Phase identifies a point in the life cycle at which introduction may occur, while the Note provides a typical scenario related to introduction during the given phase.
阶段 Note
Implementation OMISSION: This weakness is caused by missing a security tactic during the architecture and design phase.
+Applicable Platforms
Section HelpThis listing shows possible areas for which the given weakness could appear. These may be for specific named Languages, Operating Systems, Architectures, Paradigms, Technologies, or a class of such platforms. The platform is listed along with how frequently the given weakness appears for that instance.

Languages

Class: Not Language-Specific(Undetermined Prevalence)

+Common Consequences
Section HelpThis table specifies different individual consequences associated with the weakness. The Scope identifies the application security area that is violated, while the Impact describes the negative technical impact that arises if an adversary succeeds in exploiting this weakness. The Likelihood provides information about how likely the specific consequence is expected to be seen relative to the other consequences in the list. For example, there may be high likelihood that a weakness will be exploited to achieve a certain impact, but a low likelihood that it will be exploited to achieve a different impact.
Scope 影响 Likelihood
正直

Technical Impact:Modify Application Data

没有适当的保护机制,客户可以轻松地使用cookie和类似的网络数据篡改。依靠没有详细验证的cookie会导致SQL注入等问题。如果您使用cookie值在服务器端上与安全相关的决策,则操纵cookie可能会导致违反安全策略,例如绕过身份验证,用户模仿和特权升级。此外,在没有适当保护的情况下将敏感数据存储在cookie中也可能导致披露敏感用户数据,尤其是存储在持续的cookie中的数据。
+Demonstrative Examples

Example 1

In this example, a web application uses the value of a hidden form field (accountID) without having done any input validation because it was assumed to be immutable.

(bad code)
Example Language:Java
字符串accountId = request.getParameter(“ accountId”);
User user = getUserFromID(Long.parseLong(accountID));

Example 2

Hidden fields should not be trusted as secure parameters.

An attacker can intercept and alter hidden fields in a post to the server as easily as user input fields. An attacker can simply parse the HTML for the substring:

(bad code)
Example Language:HTML
<输入类型=“隐藏”

or even just "hidden". Hidden field values displayed later in the session, such as on the following page, can open a site up to cross-site scripting attacks.

+观察到的例子
Reference Description
Forum product allows spoofed messages of other users via hidden form fields for name and e-mail address.
Shopping cart allows price modification via hidden form field.
Shopping cart allows price modification via hidden form field.
Shopping cart allows price modification via hidden form field.
Shopping cart allows price modification via hidden form field.
Shopping cart allows price modification via hidden form field.
允许通过修改表单字段的值来访问管理员。
Read messages by modifying message ID parameter.
Send email to arbitrary users by modifying email parameter.
Authentication bypass by setting a parameter.
Product does not check authorization for configuration change admin script, leading to password theft via modified e-mail address field.
逻辑错误导致密码披露。
Modification of message number parameter allows attackers to read other people's messages.
+Potential Mitigations

阶段: Implementation

Strategy: Input Validation

Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

阶段: Implementation

Strategy: Input Validation

在经过验证之前CWE-180)。Make sure that the application does not decode the same input twice (CWE-174)。此类错误可以用来绕过允许列表验证方案,通过检查危险输入后进行检查。
+会员资格
Section HelpThis 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.
Nature Type ID Name
MemberOf 类别类别- a CWE entry that contains a set of other entries that share a common characteristic. 715 OWASP Top Ten 2007 Category A4 - Insecure Direct Object Reference
MemberOf 类别类别- a CWE entry that contains a set of other entries that share a common characteristic. 722 OWASP Top Ten 2004 Category A1 - Unvalidated Input
MemberOf 类别类别- a CWE entry that contains a set of other entries that share a common characteristic. 991 SFP Secondary Cluster: Tainted Input to Environment
MemberOf 类别类别- a CWE entry that contains a set of other entries that share a common characteristic. 1348 OWASP Top Ten 2021 Category A04:2021 - Insecure Design
+Notes

Relationship

This is a primary weakness for many other weaknesses and functional consequences, including XSS, SQL injection, path disclosure, and file inclusion.

Theoretical

This is a technology-specific MAID problem.
+Taxonomy Mappings
Mapped Taxonomy Name Node ID 合身 Mapped Node Name
PLOVER Web Parameter Tampering
OWASP Top Ten 2007 A4 CWE More Specific 不安全的直接对象参考
OWASP Top Ten 2004 A1 CWE More Specific Unvalidated Input
+参考
[REF-44] Michael Howard, David LeBlanc and John Viega. "24 Deadly Sins of Software Security". "Sin 4: Use of Magic URLs, Predictable Cookies, and Hidden Form Fields." Page 75. McGraw-Hill. 2010.
[Ref-62] Mark Dowd,John McDonald和Justin Schuh。“软件安全评估的艺术”。第17章,“ HTML和URL中的嵌入状态”,第1032页。第一版。艾迪生·卫斯理。2006。
+Content History
+Submissions
提交日期 Submitter Organization
2006-07-19 PLOVER
+Modifications
Modification Date 修饰符 Organization
2008-07-01 Sean Eidemiller 雪茄
added/updated demonstrative examples
2008-07-01 Eric Dalci 雪茄
updated Potential_Mitigations, Time_of_Introduction
2008-09-08 CWE Content Team MITRE
updated Description, Relationships, Other_Notes, Taxonomy_Mappings
2009-01-12 CWE Content Team MITRE
updated Relationships
2009-07-27 CWE Content Team MITRE
updated Potential_Mitigations
2009-10-29 CWE Content Team MITRE
更新的common_ccessequences,expdiveative_examples,description,other_notes,relate_notes,theoricentic_notes
2010-04-05 CWE Content Team MITRE
updated Related_Attack_Patterns
2010-12-13 CWE Content Team MITRE
updated Description
2011-03-29 CWE Content Team MITRE
updated Potential_Mitigations
2011-06-01 CWE Content Team MITRE
updated Common_Consequences
2011-06-27 CWE Content Team MITRE
updated Common_Consequences
2012-05-11 CWE Content Team MITRE
更新了示范示例,参考,关系
2014-07-30 CWE Content Team MITRE
updated Relationships
2015-12-07 CWE Content Team MITRE
updated Relationships
2017-11-08 CWE Content Team MITRE
updated Applicable_Platforms, Demonstrative_Examples, Modes_of_Introduction, Relationships
2019-01-03 CWE Content Team MITRE
updated Related_Attack_Patterns
2019-06-20 CWE Content Team MITRE
updated Related_Attack_Patterns, Relationships
2020-02-24 CWE Content Team MITRE
更新的电势_限制,关系
2020-06-25 CWE Content Team MITRE
updated Potential_Mitigations
2021-10-28 CWE Content Team MITRE
updated Relationships
+Previous Entry Names
Change Date Previous Entry Name
2008-04-11 Web Parameter Tampering
More information is available — Please select a different filter.
Page Last Updated:January 31, 2023