← Java / Spring · Contents

JAVA-070 / Advanced

Ignoring @Transactional self-invocation

A04:2021 Insecure Design · CWE-362

Why is this a problem?

Calls within the same class bypass the proxy, so transaction and authorization annotations are ignored.

How to fix it

java
// Move b to another bean or perform authorization at the proxy boundary (external entry point)

Further reading