CWE-102 Structs:重复验证表单

admin 2022年1月7日02:24:16评论33 views字数 1451阅读4分50秒阅读模式

CWE-102 Structs:重复验证表单

Struts: Duplicate Validation Forms

结构: Simple

Abstraction: Variant

状态: Incomplete

被利用可能性: unkown

基本描述

The application uses multiple validation forms with the same name, which might cause the Struts Validator to validate a form that the programmer does not expect.

扩展描述

If two validation forms have the same name, the Struts Validator arbitrarily chooses one of the forms to use for input validation and discards the other. This decision might not correspond to the programmer's expectations, possibly leading to resultant weaknesses. Moreover, it indicates that the validation logic is not up-to-date, and can indicate that other, more subtle validation errors are present.

相关缺陷

  • cwe_Nature: ChildOf cwe_CWE_ID: 694 cwe_View_ID: 1000 cwe_Ordinal: Primary

  • cwe_Nature: ChildOf cwe_CWE_ID: 1173 cwe_View_ID: 1000

  • cwe_Nature: ChildOf cwe_CWE_ID: 1173 cwe_View_ID: 699 cwe_Ordinal: Primary

  • cwe_Nature: ChildOf cwe_CWE_ID: 20 cwe_View_ID: 700 cwe_Ordinal: Primary

适用平台

Language: {'cwe_Name': 'Java', 'cwe_Prevalence': 'Undetermined'}

常见的影响

范围 影响 注释
Integrity Unexpected State

可能的缓解方案

Implementation

策略:

The DTD or schema validation will not catch the duplicate occurrence of the same form name. To find the issue in the implementation, manual checks or automated static analysis could be applied to the xml configuration files.

示例代码

Two validation forms with the same name.

bad XML

...

...

It is critically important that validation logic be maintained and kept in sync with the rest of the application.

分类映射

映射的分类名 ImNode ID Fit Mapped Node Name
7 Pernicious Kingdoms Struts: Duplicate Validation Forms
Software Fault Patterns SFP24 Tainted input to command

文章来源于互联网:scap中文网

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年1月7日02:24:16
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   CWE-102 Structs:重复验证表单http://cn-sec.com/archives/612741.html

发表评论

匿名网友 填写信息