Umbra Wiki weakness weakness/CWE-608
Back to wiki

CWE-608 — Struts: Non-private Field in ActionForm Class

provenance: imported · CWE: CWE-608

CWE-608: Struts: Non-private Field in ActionForm Class

MITRE CWE weakness

Kind Weakness
Abstraction Variant
Status Draft
Likelihood of exploit

Description

An ActionForm class contains a field that has not been declared private, which can be accessed without using a setter or getter.

Common consequences

  • Integrity, Confidentiality: Modify Application Data, Read Application Data

Mitigations

Implementation — Make all fields private. Use getter to get the value of the field. Setter should be used only by the framework; setting an action form field from other actions is bad practice and should be avoided.

References

  • CWE page: https://cwe.mitre.org/data/definitions/608.html
  • CWE list: https://cwe.mitre.org/data/index.html