CWE-102 Structs:重复验证表单

admin 2022年1月7日02:24:16CWE(弱点枚举)评论11 views1451字阅读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中文网

特别标注: 本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
  • 我的微信
  • 微信扫一扫
  • weinxin
  • 我的微信公众号
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年1月7日02:24:16
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                  CWE-102 Structs:重复验证表单 http://cn-sec.com/archives/612741.html

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: