CWE-492 Inner Classes Containing Sensitive Data in Java
Java inner classes look private in source but compile to package level classes. Sensitive data placed in them is easier to reach than it appears.
Deep dives, practical guides, and incident analyses from engineers who build Safeguard. No fluff, no vendor FUD — just what you need to ship secure software.
Java inner classes look private in source but compile to package level classes. Sensitive data placed in them is easier to reach than it appears.
A non final clone method lets an attacker build an object without running its constructor, skipping your checks. Make the method final to close it.
Append a slash to a URL and some servers return source code or skip authentication. How CWE-49 works and how to prevent it.
Debug functions left on in production become entry points. CWE-489 explains the risk, shows recent device examples and a build check to catch it.
Storing user data in a servlet member field lets one user see another's data. Learn how singleton state leaks across sessions and how to keep it per request.
Java package scope prevents accidents, not attacks. If a package is distributed, anyone can add a class to it and reach your data. Protect with private final.
Trusting an object because its class name matches lets an attacker supply a look alike class. Compare class identity instead of strings.
A missing break makes one case run the code of the next. Learn why fallthrough bugs are hard to tell from intent and how to make intent explicit.
Leaving out braces on a multi statement block lets an indented line look guarded when it is not. See how that broke certificate checks and how to prevent it.
Weekly insights on software supply chain security, delivered to your inbox.
Your first fix PR is minutes away.
No sales call required, even your agent can complete the purchase over MCP.