← Java / Spring · Contents

JAVA-025 / Beginner

Exposing stack traces or exception messages

A05:2021 Security Misconfiguration · CWE-209 Error Message Information Exposure

Why is this a problem?

Responses include SQL, internal paths and library versions.

How to fix it

yaml
server.error.include-stacktrace: never
server.error.include-message: never

Further reading