The vulnerability stems from a logical error in how SAML signature validation results were communicated. The SAMLService.validateSignature function returned an error message as a string upon failure, while the calling functions, SAMLService.handleSSORequest and SAMLService.handleSLORequest, expected an exception to be thrown and did not inspect the return value. This disconnect meant that signature validation failures were silently ignored, allowing the application to process forged SAML requests as if they were valid. An attacker could exploit this to either steal user data via a forged AuthnRequest or cause a denial of service by terminating user sessions with a forged LogoutRequest. The patch remediates this by altering validateSignature to throw an exception on failure, which aligns its behavior with the expectations of the calling functions, thereby ensuring that invalid signatures correctly halt execution.