A flow built around a trusted side channel (SMTP inbox, SMS carrier, push provider, on-device authenticator) depends on the recipient of that channel being the credential. The HTTP caller asks for a secret and only ever receives an acknowledgement. Completing the flow requires observing the side channel, which is an action that requires control of the trusted address. This is not bearer-token authorization. The inbox is the token.
The failure mode is a service function that constructs the secret, hands it to the side-channel sender, and then returns the same object to its controller. The controller marshals that object into res.json, jsonify(...), Response(...) or the framework's equivalent. The serializer walks whatever it is given. The same token the server emailed is now reachable through the response body the unauthenticated caller already has. Two consumers, one object, no type to keep them apart.
The conflation usually ships because the service function's return value is the ORM entity or DTO the function hydrated. manager.save rehydrates the full row with every column. Active Record .save returns the full row. SQLAlchemy session.refresh returns the full row. The return statement reads return data, return user, return account, and the author's mental model is that the function has one caller. It has two. The side-channel sender uses one field (user.email, phone.number). The response serializer walks every field reachable from the object. The columns the sender ignored are the columns the response ships.
CVE-2025-58434 against Flowise is the canonical site. forgotPassword mints a tempToken, writes it to the user row via manager.save (which rehydrates data.user with every column including tempToken, tokenExpiry, and the bcrypt credential), builds a reset link, calls sendPasswordResetEmail(data.user.email!, resetLink), and finishes with return data. The controller is one line: return res.status(StatusCodes.CREATED).json(data). The token leaves on the trusted side channel exactly as designed. The token also leaves in the HTTP response body because res.json walks the AccountDTO and finds tempToken on it. Two unauthenticated POSTs take over any account whose email you know.
The pattern recurs across any flow whose security model is "we told you nothing, go read the inbox." Password reset, email verification, magic link login, MFA enrollment with server-generated seeds, invite acceptance, device registration, account recovery codes. It recurs because the ergonomic default in ORMs and DTO libraries is to return the full object and let the serializer handle shaping. Each new secret column added to the entity (webhook signing key, OAuth refresh token, MFA seed, recovery code set) expands a response payload nobody meant to expand. The function's signature does not record that one of its two callers is a hostile network boundary.
The short-term fix strips the secret-bearing columns before the serializer sees the object. Flowise's patch is a three-line sanitizeUser helper that deletes credential, tempToken and tokenExpiry, applied at every account-service return. It closes the current CVE. It does not close the class. The deeper fix is a typed view (UserResponse, AccountView, SessionView) whose shape omits the secret columns by construction, so the compiler rejects any attempt to hand the raw entity to the response boundary. The patch worth shipping does both.