PYTHON-6073 Authentication identity smuggling via NUL-byte injection in SASL PLAIN payload
Description
Someone who controls a login username or password can use NUL-byte injection to smuggle extra hidden fields into the authentication message and potentially log in as a different identity, on LDAP/PLAIN setups.
Details
See jira.mongodb.org/
Proof of concept
See jira.mongodb.org/
Impact
An unauthenticated party supplying login input to a PLAIN/LDAP pass-through application can re-segment the authentication message so the server authenticates an identity (and checks a password) different from what the application validated. Identity smuggling and audit-attribution corruption, up to full authentication bypass depending on the receiver's NUL handling.