Insecure service configuration - usesCleartextTraffic
Description
The application has android:usesCleartextTraffic set to true, which allows it to access resources that do not use encryption, a situation that could be exploited by an attacker to perform MitM attacks and compromise the confidentiality and integrity of the application.
Impact
- Obtain sensitive information through MitM attacks.
- Modify intercepted information with the aim of deceiving an application user.
Recommendation
The android:usesCleartextTraffic must be set to false.
Threat
Attacker without credentials from the same network segment as an application user.
Expected Remediation Time
⌚ 15 minutes.
Score
Default score using CVSS 3.1. It may change depending on the context of the vulnerability.
Base
- Attack vector: A
- Attack complexity: H
- Privileges required: N
- User interaction: R
- Scope: U
- Confidentiality: L
- Integrity: L
- Availability: N
Temporal
- Exploit code madurity: P
- Remediation level: O
- Report confidence: C
Result
- Vector string: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P/RL:O/RC:C
- Score:
- Base: 3.7
- Temporal: 3.4
- Severity:
- Base: Low
- Temporal: Low
Code Examples
Compliant code
The application manifest has usesCleartextTraffic set to false
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android.uid.system" android:versionCode="4" android:versionName="1.0" android:usesCleartextTraffic= "False" package="com.android.zerosms">
<uses-permission android:name="android.permission.SEND_SMS"/>
<application android:label="@7F040001" android:icon="@7F020002">
<provider
android:authorities="com.andriod.databasetest.contentprovider"
android:name=".db.ContentProviderDb"
android:exported="false"
android:grantUriPermissions="true">
</provider>
</application>
</manifest>
Non compliant code
The application manifest has usesCleartextTraffic set to true
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android.uid.system" android:versionCode="4" android:versionName="1.0" android:usesCleartextTraffic= "True" package="com.android.zerosms">
<uses-permission android:name="android.permission.SEND_SMS"/>
<application android:label="@7F040001" android:icon="@7F020002">
<provider
android:authorities="com.andriod.databasetest.contentprovider"
android:name=".db.ContentProviderDb"
android:exported="true"
android:grantUriPermissions="true">
</provider>
</application>
</manifest>
Requirements
Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.