-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MASWE-0117 - Inadequate Permission Management #3119
Open
cpholguera
wants to merge
5
commits into
master
Choose a base branch
from
add-maswe-0117
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+65
−0
Open
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6f42488
Add MASWE-0117: Inadequate Permission Management
cpholguera 90b904a
Update CWE reference for MASWE-0117 from 359 to 250
cpholguera 62057a1
Remove duplicate Android permission request references in MASWE-0117
cpholguera 197bd22
Clarify permission management risks and add new references
cpholguera 24dbbbe
fix missing white space
cpholguera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,55 @@ | ||||
--- | ||||
title: Inadequate Permission Management | ||||
id: MASWE-0117 | ||||
alias: inadequate-permission-management | ||||
platform: ["android", "ios"] | ||||
profiles: ["P"] | ||||
mappings: | ||||
masvs-v1: [] | ||||
masvs-v2: [MASVS-PRIVACY-1] | ||||
cwe: [250] | ||||
refs: | ||||
- https://developer.apple.com/design/human-interface-guidelines/privacy#Requesting-permission | ||||
- https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources | ||||
- https://developer.android.com/training/permissions/requesting#explain | ||||
- https://support.google.com/googleplay/android-developer/answer/9888170?hl=en | ||||
- https://developer.android.com/privacy-and-security/minimize-permission-requests | ||||
- https://developer.android.com/training/permissions/requesting | ||||
- https://developer.android.com/training/permissions/requesting#remove-access | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need these URLs with the anchor, as we anyway are referencing to the main page (https://developer.android.com/training/permissions/requesting) |
||||
- https://developer.android.com/training/permissions/usage-notes | ||||
- https://arxiv.org/pdf/1905.02713 | ||||
- https://arxiv.org/pdf/2203.10583 | ||||
- | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
|
||||
cpholguera marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
status: new | ||||
--- | ||||
|
||||
## Overview | ||||
|
||||
Inadequate permission management poses significant risks to user privacy and security in mobile apps. Permissions control access to sensitive device features, such as the camera, microphone, location, and storage, which are essential for app functionality. However, improper management, such as requesting excessive or unnecessary permissions, can lead to privacy violations, unauthorized data access, and erosion of user trust. For example, some apps retain access to sensitive resources long after they are no longer needed (even when platforms like Android 13 offer mechanisms to revoke unused permissions). Developers face the challenge of balancing functionality with privacy, as revoking permissions can disrupt app usability, forcing users to choose between privacy and functionality. | ||||
cpholguera marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
Some apps, especially those that come pre-installed on devices, are often granted excessive privileges without needing explicit consent. Also, some regular apps may request permissions that are not necessary for their core functionality or request broader access than needed. For example, granting access to the camera may also grant access to the photo gallery, reducing user control. Privacy-friendly alternatives (e.g., coarse location or image picker) are often ignored. | ||||
cpholguera marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
Third-party libraries (SDKs) further complicate permission management by inheriting app permissions. The third-party services behind those libraries may continue to access data collected over the network even after permissions are revoked or the app is deleted. Users typically lack visibility and control over this data retention, which can then be used for marketing, profiling, or other purposes without the user's explicit consent or control. | ||||
|
||||
## Modes of Introduction | ||||
|
||||
- **Lack of Proactive Permission Revocation**: Not automatically revoking app permissions that are no longer necessary, resulting in unnecessary data access over time. | ||||
- **Requesting Excessive Permissions**: Apps requesting more permissions than necessary for core functionality, often resulting in excessive data collection beyond what is required for the app to operate. | ||||
- **Lack of Use of Privacy-Friendly Alternatives**: Failing to use privacy-friendly alternatives to permissions that are less intrusive and provide users with more control over their data. For example, using coarse location instead of fine location, or using an image picker instead of requesting access to the camera and photo gallery. | ||||
|
||||
## Impact | ||||
|
||||
- **Violation of User Privacy**: Users may have their personal data accessed unnecessarily leading to potential misuse of personal data, identity theft or surveillance. | ||||
cpholguera marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
- **Loss of User Trust**: Users may lose trust in an app if it requests unnecessary permissions or does not allow them to revoke permissions that are no longer relevant. This can lead to negative reviews, lower user engagement, and reduced retention. | ||||
- **Legal and Compliance Issues**: Apps that improperly manage permissions may face non-compliance with privacy regulations like GDPR or CCPA, which require data minimization and appropriate user control over data access, resulting in potential fines, legal action, or removal from app stores. | ||||
- **Malicious Abuse:** Harmful apps can misuse permissions from privileged apps to record, track, or steal data without user consent. | ||||
- **Security Breaches:** Once the collected sensitive data otherwise protected by permissions leaves the app, if it's poorly protected on the remote endpoints, it can be vulnerable to cyberattacks. | ||||
cpholguera marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
|
||||
## Mitigations | ||||
|
||||
- **Enable Proactive Permission Revocation**: Automatically revoke permissions that are no longer necessary to minimize unnecessary data access over time. Ensure that users can manually revoke permissions at any time through a clear and accessible interface. | ||||
- **Prefer Privacy-Friendly Alternatives**: Use privacy-friendly alternatives to permissions that are less intrusive and provide users with more control over their data. For example, use coarse location instead of fine location, or use an image picker instead of requesting access to the camera and photo gallery. | ||||
- **Limit Permissions to Essential Needs**: Ensure apps only request permissions necessary for core functionality, avoiding the collection of unnecessary data and adhering to the principle of data minimization. | ||||
- **Implement Just-in-Time Permission Requests**: Request permissions only when they are needed, providing clear explanations for why each permission is required. This approach helps build user trust and ensures users understand the implications of granting access to their data. | ||||
- **User Education on Permissions**: Educate users about why specific permissions are needed and how they can manage these permissions. Providing transparency builds user trust and ensures users understand the importance and relevance of each permission. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need these URLs with the anchor, as we anyway are referencing to the main page (https://developer.android.com/training/permissions/requesting)