Java4Shell (CVE-2026-114938) critical severity memory-corruption vulnerability affects OpenJDK 17, 21, 25 and 27 on x86-64 with AVX-512. Azul has your Security-only, Stability-first™ patch

Java Application Security

Java application security is the set of practices and tools that protect applications written in Java, and the platform they run on, from attack. It covers the code your team writes, the third-party libraries it depends on, the Java runtime that executes it, and the configuration around all of them. For web-facing systems, Java web application security matters especially, because those applications are exposed to the outside world by design.

Is Java secure?

Java has real security advantages. It checks array boundaries automatically, uses automatic memory management, enforces strong typing, and has no direct pointer access, which removes whole classes of bugs, such as classic buffer overflows, that plague languages like C and C++. The JVM also isolates running code from the underlying operating system.

But a secure language is not a secure application. Risk comes from how Java is used, and sometimes from the platform itself. In November 2026, researchers disclosed Java4Shell (CVE-2026-114938), a memory-corruption flaw in a hardware-optimized Base64 decoder inside OpenJDK’s HotSpot VM. It shows that native, performance-critical code in the runtime can still contain serious flaws, and that keeping the runtime patched is part of application security.

The four layers of Java application security

LayerFocusExample risk
Application codeSecure coding and testingSQL injection, cross-site scripting
DependenciesKeeping libraries current, maintaining an SBOMLog4Shell (CVE-2021-44228)
Java runtimeTimely JDK security updatesJava4Shell (CVE-2026-114938)
Configuration and accessAuthentication, authorization, session handlingExposed endpoints, weak access control

Common Java web application security vulnerabilities

  • Cross-site scripting (XSS): malicious scripts stored in or reflected by the application run in other users’ browsers, enabling theft of cookies and session data.
  • SQL injection: unsanitized input is concatenated into database queries, letting attackers read data or run commands.
  • Data exposure: weak encryption or hardcoded credentials reveal passwords, card numbers, or other sensitive data.
  • Insufficient access control: unauthorized users reach protected resources by guessing URLs or object identifiers.
  • Outdated, vulnerable components: unpatched third-party frameworks, with the Log4j vulnerabilities as the best-known example.

Java application security best practices

  1. Validate all input and use parameterized queries or prepared statements instead of building SQL from user input.
  2. Keep dependencies current and maintain a software bill of materials (SBOM) so you know what to update when the next library flaw is announced.
  3. Patch the Java runtime promptly. Apply JDK security updates on a defined schedule and have a faster path for critical out-of-cycle fixes.
  4. Use strong authentication and authorization, including multi-factor authentication and role-based access control, and secure session handling with HttpOnly and Secure cookie flags.
  5. Set security headers, such as Content Security Policy, and avoid revealing internal details in error messages.
  6. Test in layers: static analysis for code, composition analysis for libraries, and dynamic testing for the running application.
  7. Know what actually runs in production, so you can prioritize the vulnerabilities that matter.

How Azul helps with Java application security

Azul focuses on the runtime layer of Java application security and on helping teams act on what they find.

  • Azul Core gives teams a supported OpenJDK build with quarterly, monthly, and out-of-cycle security updates. Its Security-only, Stability-first updates contain only security fixes, built on the previous quarter’s stabilized update, which helps teams deploy fixes with less regression risk. Azul Core includes 24x7x365 support from Java experts. When Java4Shell was disclosed, Azul shipped its fix for Azul Core and Azul Prime within an hour of the coordinated release.
  • Azul Intelligence Cloud uses data from production Java runtimes to show which classes and JARs actually run. Its Vulnerability Detection capability flags vulnerabilities that are exercised in production, so teams can prioritize real exposure over theoretical findings.
  • Azul Runtime Inventory shows which Java runtimes you run in production and whether each has the latest security update.

For a deeper look at tooling, see our comparison of Java security tools.