PYTHON-5990ClosedFixed

Reject Unix domain socket KMS endpoints in client-side field level encryption

{{_EncryptionIO.kms_request}} passes the KMS endpoint surfaced by libmongocrypt straight to {{parse_host(endpoint, 443)}}. {{parse_host}} returns any string ending in {{.sock}} verbatim, skipping the hostname/port validation applied to every other input. {{_create_connection}} (and the async equivalent in {{pymongo/pool_shared.py}}) then treats an address ending in {{.sock}} as a Unix domain socket path and connects to it with {{AF_UNIX}}. libmongocrypt builds that endpoint from {{masterKey.end

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
4.18.2
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
greenerbuild