The vulnerability stems from two main issues in Apache StreamPark's authentication and encryption mechanisms. First, the EncryptUtils class used a weak and predictable method for generating encryption keys. It either used a hardcoded default key (an MD5 hash of "ApacheStreamPark") or improperly derived a key from a user-provided string (like a password) by seeding a pseudo-random number generator. This class was completely removed in the patch.
Second, the JWTUtil.sign method used the user's password directly as the secret key to sign JSON Web Tokens (JWTs). This meant that if a user's password was known, an attacker could forge authentication tokens for that user. The patch replaces this with a strong, randomly generated secret key that is stored securely on the server filesystem.
The vulnerable functions are the methods within the removed EncryptUtils class (encrypt, decrypt) and the JWTUtil.sign method that performed the insecure JWT signing. The ShiroRealm.doGetAuthenticationInfo method is also included as it contained the logic that invoked the vulnerable JWT verification using the user's password.