Werkzeug's safe_join function improperly allows Windows special device names such as CON and AUX as path segments. On Windows systems, these device names exist implicitly in every directory. When used with send_from_directory, a request ending with a special device name will open the file but cause the read operation to hang indefinitely. This affects Werkzeug versions prior to 3.1.4.