Skip to main content
Mallory
← Back to News
endpoint-software-vulnerabilitywidely-deployed-product-advisoryinternet-facing-service-vulnerability

Safari Redirect Handling Flaw Enabled Host Header XSS and Origin Confusion

Vulnerability Disclosure · 6 sources · Updated 3mo ago · First seen Oct 9, 2018

Safari Redirect Handling Flaw Enabled Host Header XSS and Origin Confusion

Apple patched CVE-2016-4585, a WebKit page-loading vulnerability in Safari that allowed remote attackers to inject arbitrary script or HTML through specially crafted HTTP redirections. The flaw affected Safari before 9.1.2, iOS before 9.3.3, and tvOS before 9.2.2, and stemmed from improper handling of redirect targets with malformed, non-numeric ports. Researchers showed Safari could send invalid Host headers after following such redirects, creating exploitable conditions in web applications that reflected the header into pages, scripts, links, forms, anchors, or subsequent Location values.

The research also described an origin confusion condition in which pages reached through the malformed redirect could execute in a broken security context. When combined with an iframe, relative resources from a target page could be resolved against an attacker-controlled site, enabling cross-site scripting, spoofing, information theft, and possible content exfiltration or alteration under specific application conditions. Apple addressed the issue by tightening redirect URL validation so invalid redirection URLs trigger an error instead of being processed.

Do you run this?See affected versions and whether adversaries are exploiting it.
Check your exposure
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

5 events · Sep 2015 – Oct 9, 2018
  1. Oct 9, 20188y ago

    CVE-2016-4585 record is updated

    The CVE record for CVE-2016-4585 was updated. The record notes the update date and retains references to Apple advisories and related third-party material.

    CVE Record: CVE-2016-4585
  2. Sep 21, 201610y ago

    Technical write-up discloses exploitation details for CVE-2016-4585

    A public research write-up detailed how malformed redirect URLs could cause Safari to send invalid Host headers and create a broken-origin condition, enabling XSS or information theft under certain application conditions. The disclosure also documented iframe-based exploitation and Apple's validation-based fix behavior.

    Safari's URL redirection XSS - CVE-2016-4585 | 技術者ブログ | 三井物産セキュアディレクション株式会社
  3. Jul 22, 201610y ago

    CVE-2016-4585 is published

    The CVE record for CVE-2016-4585 was published, describing a WebKit Page Loading cross-site scripting vulnerability in Safari, iOS, and tvOS triggered by mishandled HTTP redirections. The entry identified Apple as the CNA and linked Apple advisories and third-party references.

    CVE Record: CVE-2016-4585
  4. Jul 18, 201610y ago

    Apple releases fixes for affected Safari, iOS, and tvOS versions

    Apple fixed the vulnerability by strengthening validation of redirect URLs so invalid redirect targets produce an error page. The affected products were Safari before 9.1.2, iOS before 9.3.3, and tvOS before 9.2.2, and users were advised to upgrade to versions released on or after July 18, 2016.

    Safariのリダイレクト処理のXSS脆弱性 CVE-2016-4585 | 技術者ブログ | 三井物産セキュアディレクション株式会社
  5. Sep 2015

    Researchers report Safari redirect XSS bug to Apple and IPA

    The Safari URL handling vulnerability later assigned CVE-2016-4585 was reported to Apple and Japan's IPA in September 2015. The flaw involved crafted redirect URLs that could enable Host header manipulation and origin-confusion-based XSS.

    Safari's URL redirection XSS - CVE-2016-4585 | 技術者ブログ | 三井物産セキュアディレクション株式会社
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Affected products

4 linked
TvosSafariIosWebkit

Organizations

1 linked
Apple
Do you run this?See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
Check Your Exposure
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.