{"record":{"id":"1c8156f1923ca476","repo":"sqlmapproject/sqlmap","slug":"unexpected-caching-sha2-auth-status-d","errorCode":null,"errorMessage":"unexpected caching_sha2 auth status %d","messagePattern":"unexpected caching_sha2 auth status (.+?)","errorType":"exception","errorClass":"OperationalError","httpStatus":null,"severity":"error","filePath":"extra/dbwire/mysql.py","lineNumber":280,"sourceCode":"            plugin, off = _cstring(payload, 1)\n            plugin = plugin.decode(\"ascii\", \"replace\")\n            salt = payload[off:].rstrip(b\"\\x00\")\n            if plugin == \"mysql_native_password\":\n                data = _scramble_native(password, salt)\n            elif plugin == \"caching_sha2_password\":\n                data = _scramble_sha2(password, salt)\n            else:\n                raise NotSupportedError(\"unsupported authentication plugin '%s'\" % plugin)\n            _send_packet(sock, seq + 1, data)\n        elif marker == 0x01:  # AuthMoreData (caching_sha2)\n            status = _u8(payload, 1)\n            if status == 0x03:  # fast auth success -> OK packet follows\n                continue\n            elif status == 0x04:  # full auth required (needs TLS or RSA - not available stdlib-only)\n                raise NotSupportedError(\"caching_sha2_password full authentication over a plaintext connection \"\n                                        \"requires RSA/TLS; use a mysql_native_password account for the dependency-free client\")\n            else:\n                raise OperationalError(\"unexpected caching_sha2 auth status %d\" % status)\n        else:\n            raise InterfaceError(\"unexpected authentication response 0x%02x\" % marker)\n\ndef connect(host=None, port=3306, user=None, password=None, database=None, connect_timeout=None, **kwargs):\n    try:\n        sock = socket.create_connection((host or \"localhost\", int(port or 3306)), timeout=connect_timeout)\n        keepalive(sock)\n    except (socket.error, socket.timeout) as ex:\n        raise OperationalError(\"could not connect to '%s:%s' (%s)\" % (host, port, ex))\n\n    try:\n        seq, payload = _read_packet(sock)\n        if _u8(payload, 0) == 0xff:\n            raise OperationalError(\"(remote) %s\" % _err_message(payload))\n\n        off = 1                                         # protocol version (10)\n        _, off = _cstring(payload, off)                 # server version\n        off += 4                                        # connection id","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/extra/dbwire/mysql.py#L262-L298","documentation":"Error \"unexpected caching_sha2 auth status %d\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at extra/dbwire/mysql.py:280 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}