Failure to provide confidentiality for stored data
This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.
Last revision (mm/dd/yy): 02/17/2009
Non-final public fields should be avoided, if possible, as the code is easily tamperable.
- Integrity: The object could potentially be tampered with.
- Confidentiality: The object could potentially allow the object to be read.
- Implementation: This flaw is a simple logic issue, introduced entirely at implementation time.
- Languages: Java, C++
- Operating platforms: Any
Likelihood of exploit
If a field is non-final and public, it can be changed once their value is set by any function which has access to the class which contains the field.
public int password r = 45;
public String r = new String("My Password");
Now this field is readable from any function and can be changed by any function.
- Implementation: Make any non-final field private.
Related Technical Impacts