...
A method declared synchronized
always uses the object's monitor (intrinsic lock) and so does code that synchronizes on the this
reference using a synchronized block. This lock is available to any code that the object is available to; consequently, any code that can lock on the object , and can potentially cause a denial of service (DoS). An inappropriate synchronization policy can induce a DoS vulnerability because another class whose member locks on the same object, can fail to release the lock promptly. However, this requires the victim class to be accessible from the hostile class.
...