Skip to content
OpenAdvisories

Weakness (CWE)

CWE-767: Access to Critical Private Variable via Public Method

Variant Incomplete

The product defines a public method that reads or modifies a private variable.

How to prevent it (1 mitigation)
  1. Implementation

    Use class accessor and mutator methods appropriately. Perform validation when accepting data from a public method that is intended to modify a critical private variable. Also be sure that appropriate access controls are being applied when a public method interfaces with critical data.

Source: MITRE CWE-767

4 results · Feed