CWE-607

Public Static Final Field References Mutable Object

Medium

Description

A public or protected static final field references a mutable object, which allows the object to be changed by malicious code, or accidentally from another package.

Potential Impact

How to Fix

Implementation

Protect mutable objects by making them private. Restrict access to the getter and setter as well.

Detection Methods

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-607 vulnerabilities in your codebase.

Get Security Assessment