When pre-authentication is enabled, the gateway service accepts the pre-authenticated subject from both the `x-ditto-pre-authenticated` HTTP header and an undocumented `x-ditto-pre-authenticated` URL query parameter. This allows an unauthenticated remote attacker to bypass authentication by providing an invalid Bearer token and the query parameter to impersonate any chosen policy subject. This occurs because pre-authentication is processed before the JSON Web Token (JWT) is validated. Consequently, an attacker can read and modify Things and Policies using the permissions of the impersonated subject. In default Helm chart configurations where `global.jwtOnly` is set to `false`, the bundled nginx forwards requests containing an `Authorization: Bearer` header without the pre-authentication header, facilitating this impersonation.