AppleGHSA-m5rp-xcpf-r8m7
Insecure Hostname Validation Allows HTTP Downgrade Attack
Fix: upgrade to 0.12.3 or later
Summary
The isInternalHost() function in RequestScheme.swift uses insecure string prefix matching to determine whether a registry host should use HTTP or HTTPS. An attacker can craft hostnames (e.g., localhost.evil.com) that bypass this check, causing the client to send registry credentials over unencrypted HTTP connections.
Impact
Users who connect to malicious registries with hostnames matching the bypass patterns will have their registry credentials exposed in plaintext. This affects:
- Registry login operations (username/password)
- Image pull/push operations with authenticated registries
- Any registry interaction using the default
--scheme autosetting
Bypass patterns include any hostname starting with:
localhost(e.g.,localhost.evil.com)127.(e.g.,127.evil.com)192.168.(e.g.,192.168.evil.com)10.(e.g.,10.evil.com)172.16.through172.31.(e.g.,172.16.evil.com)
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| container Product | < 0.12.3 | 0.12.3 |
Details and references
- CVSS 4.0
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:N/SC:L/SI:N/SA:N
- Severity from
- GitHub (reviewed advisory)