CVE-2016-4585: Cross-site scripting in Safari URL redirection
- Vendor
- Apple
CVE-2016-4585 is a cross-site scripting vulnerability in the WebKit Page Loading implementation affecting Apple iOS before 9.3.3, Safari before 9.1.2, and tvOS before 9.2.2. The flaw is triggered when Safari mishandles an HTTP redirection response containing a crafted redirect target. Available technical detail indicates the bug is tied to insufficient validation of redirect URLs, particularly malformed host and port handling during redirection. In vulnerable versions, Safari could accept an invalid non-numeric port in a redirect target, connect using the default port, and propagate a malformed host value, creating conditions for host header manipulation and origin confusion. These behaviors could be leveraged to inject arbitrary web script or HTML, bypass normal origin expectations, and cause cross-origin data exfiltration or spoofed content rendering in Safari. Apple addressed the issue by improving URL validation during redirection.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows a remote attacker controlling malicious web content to execute arbitrary script or inject HTML in the victim's browser context under specific conditions. Documented outcomes include cross-origin data exfiltration, information theft, user interface spoofing, and content tampering. In the host-header-manipulation variant, exploitation can enable script loading from an attacker-controlled origin when a target application reflects host-derived values into resource URLs or redirects. In the origin-confusion variant, attacker-controlled script may execute against the loaded document in a broken or confused origin state, allowing access to and modification of the rendered page content and theft of sensitive data present in that page, even if normal same-origin access to cookies or other sites remains constrained.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, reduce exposure by limiting use of vulnerable Safari and WebKit-based clients for untrusted web content. On the application side, avoid reflecting host-derived values into generated HTML, script source attributes, link targets, or redirect destinations; do not construct absolute URLs from untrusted Host header input; and enforce strict server-side validation of redirect targets and canonical host handling. These measures can reduce exploitability of the host-header-manipulation path, but vendor patching is the primary mitigation.
Remediation
Patch, then assume compromise.
Upgrade affected products to fixed versions: iOS 9.3.3 or later, Safari 9.1.2 or later, and tvOS 9.2.2 or later. The vendor fix consisted of improved validation of redirect URLs so invalid redirection targets are rejected rather than processed in a way that corrupts host or origin handling.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2016-4585 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2016-4585 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2016-4585?
- As of Oct 16, 2026, Mallory has found no public exploit for CVE-2016-4585.
- Is there a patch for CVE-2016-4585?
- Upgrade affected products to fixed versions: iOS 9.3.3 or later, Safari 9.1.2 or later, and tvOS 9.2.2 or later. The vendor fix consisted of improved validation of redirect URLs so invalid redirection targets are rejected rather than processed in a way that corrupts host or origin handling.
- What products are affected by CVE-2016-4585?
- Apple Webkit.
- How severe is CVE-2016-4585?
- CVE-2016-4585 has a CVSS v3 score of 6.1 (Medium) and an EPSS score of 1.9% (80th percentile) as of Oct 16, 2026.
Recent activity
6 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.