sqlmapproject/sqlmap · error · OperationalError
unexpected caching_sha2 auth status %d
Error message
unexpected caching_sha2 auth status %d
What it means
Error "unexpected caching_sha2 auth status %d" thrown in sqlmapproject/sqlmap.
Source
Thrown at extra/dbwire/mysql.py:280
plugin, off = _cstring(payload, 1)
plugin = plugin.decode("ascii", "replace")
salt = payload[off:].rstrip(b"\x00")
if plugin == "mysql_native_password":
data = _scramble_native(password, salt)
elif plugin == "caching_sha2_password":
data = _scramble_sha2(password, salt)
else:
raise NotSupportedError("unsupported authentication plugin '%s'" % plugin)
_send_packet(sock, seq + 1, data)
elif marker == 0x01: # AuthMoreData (caching_sha2)
status = _u8(payload, 1)
if status == 0x03: # fast auth success -> OK packet follows
continue
elif status == 0x04: # full auth required (needs TLS or RSA - not available stdlib-only)
raise NotSupportedError("caching_sha2_password full authentication over a plaintext connection "
"requires RSA/TLS; use a mysql_native_password account for the dependency-free client")
else:
raise OperationalError("unexpected caching_sha2 auth status %d" % status)
else:
raise InterfaceError("unexpected authentication response 0x%02x" % marker)
def connect(host=None, port=3306, user=None, password=None, database=None, connect_timeout=None, **kwargs):
try:
sock = socket.create_connection((host or "localhost", int(port or 3306)), timeout=connect_timeout)
keepalive(sock)
except (socket.error, socket.timeout) as ex:
raise OperationalError("could not connect to '%s:%s' (%s)" % (host, port, ex))
try:
seq, payload = _read_packet(sock)
if _u8(payload, 0) == 0xff:
raise OperationalError("(remote) %s" % _err_message(payload))
off = 1 # protocol version (10)
_, off = _cstring(payload, off) # server version
off += 4 # connection idView on GitHub (pinned to 0a35b20e39)
When it happens
Trigger: Thrown at extra/dbwire/mysql.py:280 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26).
Data as JSON: /api/errors/1c8156f1923ca476.
Report an issue: GitHub.