The vulnerability lies in the use of a weak, hardcoded default secret, 'Secre$t', for token encryption and decryption when the TOKEN_HASH_SECRET environment variable is not configured. This flaw is present in the encryptToken and decryptToken functions within packages/server/src/enterprise/utils/tempTokenUtils.ts. An attacker with knowledge of this default secret can decrypt the 'meta' field in JWTs, exposing internal identifiers like user and workspace IDs. While this does not grant immediate access, it provides valuable information for further attacks. The patch addresses this by removing the hardcoded default and implementing a robust secret management system. The new system, introduced in packages/server/src/enterprise/utils/authSecrets.ts, ensures that strong, unique secrets are used by default, retrieving them from environment variables, AWS Secrets Manager, or a local file, and explicitly checks against a list of known weak defaults. The functions encryptToken and decryptToken were modified to use this new secure secret retrieval mechanism, thus mitigating the vulnerability.