See https://github.com/duo-labs/py_webauthn/issues/113#issuecomment-1017816575 In short (I think) cython is converting subclasses of bytes to raw bytes in here: https://github.com/samuelcolvin/pydantic/blob/9d631a3429a66f30742c1a52c94ac18ec6ba848d/pydantic/validators.py#L79 Fix should be as simple as changing the type hint.