The program declares a content provider with only the writePermission
defined.
While it is a good idea to define separate read and write permissions for content providers, defining only the writePermission
could be misleading. Due to the nature of SQL, generating true write-only queries is generally impossible: even when the user does not have direct access to the data, an attacker can reconstruct the stored data by manipulating the where
clause.
Example: Below is an example of a content provider declared with only the writePermission
.
<provider android:name=".ContentProvider" android:writePermission="content.permission.WRITE_CONTENT"/>
[1] Standards Mapping - OWASP Top 10 2004 - (OWASP 2004) A2 Broken Access Control
[2] Standards Mapping - OWASP Top 10 2010 - (OWASP 2010) A6 Security Misconfiguration
[3] Standards Mapping - FIPS200 - (FISMA) AC
[4] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 265
[5] Jesse Burns Developing Secure Mobile Applications for Android
[6] Standards Mapping - SANS Top 25 2009 - (SANS 2009) Improper Access Control - CWE ID 285
[7] Path Permission Element
[8] Provider Element
[9] Standards Mapping - Payment Card Industry Data Security Standard Version 1.1 - (PCI 1.1) Requirement 6.5.10
[10] Standards Mapping - Payment Card Industry Data Security Standard Version 1.2 - (PCI 1.2) Requirement 7.1.1
[11] Using Permissions