← Java / Spring · Contents

JAVA-057 / Beginner

Debugging or H2 console enabled in production

A05:2021 Security Misconfiguration · CWE-489 Active Debug Code

Why is this a problem?

/h2-console enables direct DB access and command execution.

How to fix it

yaml
spring.h2.console.enabled: false    # Must be false in production

Further reading