CWE-939: Improper Authorization in Handler for Custom URL Scheme

BaseIncomplete

The product uses a handler for a custom URL scheme, but it does not properly restrict which actors can invoke the handler using the scheme.

View on MITRE
Back to CWE Lookup

Extended Description

Mobile platforms and other architectures allow the use of custom URL schemes to facilitate communication between applications. In the case of iOS, this is the only method to do inter-application communication. The implementation is at the developer's discretion which may open security flaws in the application. An example could be potentially dangerous functionality such as modifying files through a custom URL scheme.

Technical Details

Structure
Simple

Applicable To

Languages
Platforms

Frequently Asked Questions

What is CWE-939: Improper Authorization in Handler for Custom URL Scheme?+

CWE-939: Improper Authorization in Handler for Custom URL Scheme is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product uses a handler for a custom URL scheme, but it does not properly restrict which actors can invoke the handler using the scheme. Mobile platforms and other architectures allow the use of custom URL schemes to facilitate communication between applications. In the case of iOS, this is the only method to do inter-application communication. The implementation is at the developer's discretion which may open security flaws in the application. An example could be potentially dangerous functionality such as modifying files through a custom URL scheme.

How do you prevent or mitigate Improper Authorization in Handler for Custom URL Scheme?+

Recommended mitigations for CWE-939 include: Utilize a user prompt pop-up to authorize potentially harmful actions such as those modifying data or dealing with sensitive information. When designing functionality of actions in the URL scheme, consider whether the action should be accessible to all mobile applications, or if an allowlist of applications to interface with is appropriate.

What are real-world examples of Improper Authorization in Handler for Custom URL Scheme?+

MITRE documents real CVEs mapped to CWE-939, including CVE-2013-5725 and CVE-2013-5726. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-939 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More