What Happened
In early 2023, Google's Android security team disclosed CVE-2023-21328, a privilege escalation vulnerability in the Package Installer component that affects millions of Android devices worldwide. The vulnerability allows a malicious application to determine whether other apps are installed on a device—without requiring the QUERY_ALL_PACKAGES permission that normally guards this information.
What makes this particularly dangerous is the missing permission check in the Package Installer's core logic. An attacker doesn't need special execution privileges, user interaction, or even elevated device access. A simple, unprivileged app can exploit this flaw to silently enumerate the installed applications on your device—and then use that information to launch targeted attacks.
Originally reported by NIST NVD, this vulnerability affects Android devices across multiple versions and has real-world implications for businesses whose employees use Android phones for work. In my years building enterprise systems, I've seen how these seemingly small information disclosure vulnerabilities become the foundation for larger, more devastating attacks. The attacker first maps what's installed, then exploits known weaknesses in those apps.
Why This Matters for Indian Businesses
If you're running an Indian SMB with a mobile-first workforce, this vulnerability hits close to home. Here's why:
Regulatory Pressure: The Digital Personal Data Protection (DPDP) Act, 2023 now requires Indian businesses to implement "reasonable security measures" to protect personal data. When an attacker uses CVE-2023-21328 to enumerate apps and then steal data from those apps, you are liable for the breach—even if you didn't directly create the vulnerability.
CERT-In Mandate: India's CERT-In (Cybersecurity and Critical Information Assurance Centre) operates a 6-hour incident reporting window. If a breach happens via this vector and you don't detect it within 6 hours, you're already non-compliant. Most SMBs have no visibility into whether their employees' phones have been compromised.
RBI Guidelines: If your business handles payments or financial data (which most do), the Reserve Bank of India's cybersecurity framework requires you to monitor and patch known vulnerabilities. CVE-2023-21328 is now a known, documented risk—ignoring it is negligent.
Real Business Impact: Consider this scenario: An attacker uses CVE-2023-21328 to detect that your employees have banking apps, UPI apps, and accounting software installed. They then exploit vulnerabilities in those apps to steal credentials. Your customer data, financial records, and employee information are now at risk.
As someone who's reviewed hundreds of Indian SMB security postures, I can tell you that most don't even know which Android devices are on their network, let alone whether those devices are running vulnerable versions of Android. This is exactly the gap we're trying to close at Bachao.AI.
Technical Breakdown
Let me walk you through how this vulnerability actually works:
The Attack Flow
graph TD
A[Malicious App Installed] -->|Sends Intent Query| B[Package Installer Component]
B -->|Missing Permission Check| C[Returns App List]
C -->|Attacker Maps Installed Apps| D[Identifies Vulnerable Targets]
D -->|Exploits Known App Vulns| E[Steals Data/Credentials]
E -->|Lateral Movement| F[Breach]How the Exploit Works
The vulnerability exists in how Android's Package Installer handles Intent queries. Normally, when an app wants to query whether another app is installed, Android enforces the QUERY_ALL_PACKAGES permission. However, CVE-2023-21328 allows an attacker to bypass this check by:
- Sending a crafted Intent to the Package Installer with specific parameters
- Exploiting a missing permission validation in the receiver component
- Receiving the app list without the required permission
- Enumerating installed packages to identify high-value targets
// CVE-2023-21328 Exploitation Pattern (Educational)
// This demonstrates the vulnerability concept
Intent queryIntent = new Intent("android.intent.action.QUERY_PACKAGE_RESTART");
queryIntent.setData(Uri.parse("package:com.example.targetapp"));
// Without proper permission checks in Package Installer,
// this Intent is processed and returns package information
List<ResolveInfo> receivers = context.getPackageManager()
.queryBroadcastReceivers(queryIntent, 0);
// If receivers.size() > 0, the app is installed
// Attacker can repeat for multiple apps to map the device
for (ResolveInfo info : receivers) {
Log.d("AppEnum", "Found app: " + info.activityInfo.packageName);
}The real vulnerability is that the Package Installer component doesn't validate whether the calling app has the QUERY_ALL_PACKAGES permission before responding to these Intent queries. It simply returns the information, and an attacker can use this to build a complete map of installed applications.
Why This Leads to Privilege Escalation
Once an attacker knows which apps are installed, they can:
- Target known vulnerabilities in those apps (e.g., if they detect a banking app with a known bug)
- Escalate privileges by exploiting app-to-app communication flaws
- Access sensitive data that those apps store (contacts, credentials, files)
- Move laterally to other devices on the same network
Know your vulnerabilities before attackers do
Run a free VAPT scan — takes 5 minutes, no signup required.
Book Your Free ScanHow to Protect Your Business
Immediate Actions
| Protection Layer | Action | Difficulty |
|---|---|---|
| Device Updates | Ensure all Android devices are running the latest security patches (March 2023 or later) | Easy |
| App Permissions | Audit which apps have QUERY_ALL_PACKAGES permission | Medium |
| App Inventory | Maintain a list of approved business apps on employee devices | Medium |
| Mobile Device Management (MDM) | Implement MDM to enforce security policies across devices | Hard |
| Network Monitoring | Monitor for suspicious app enumeration patterns | Hard |
| Employee Training | Educate staff about sideloading risks and phishing | Easy |
Quick Fix: Check Your Android Version
First, verify that your devices have the security patch:
# On Android device, go to Settings > About Phone > Android Version
# Look for "Security Patch Level" - it should be March 2023 or later
# If using Android Enterprise (for managed devices):
# Verify through your MDM console that all devices have patch level >= 2023-03-01For IT Administrators: Enforce App Permission Policies
If you're managing a fleet of Android devices, use Android Enterprise policies to restrict app installations:
# Example: Disable installation of apps not in your approved list
# (Configuration depends on your MDM solution - Google Workspace, Intune, etc.)
# In Google Workspace:
# 1. Go to Devices > Android > Device settings
# 2. Enable "Block installation of unknown apps"
# 3. Set "Approved apps" to only include business-critical applications
# Verify via adb (if you have direct device access):
adb shell pm list packages
# Review output for unexpected or suspicious appsFor Developers: Secure Your App
If you're building apps for Indian businesses, ensure you're not exploiting this vulnerability:
// SECURE: Check permission before querying package info
private boolean canQueryPackages(Context context) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
return context.checkSelfPermission(Manifest.permission.QUERY_ALL_PACKAGES)
== PackageManager.PERMISSION_GRANTED;
}
return true; // Pre-Android 11 doesn't require this permission
}
// SECURE: Only query packages if authorized
if (canQueryPackages(context)) {
List<ApplicationInfo> apps = context.getPackageManager()
.getInstalledApplications(PackageManager.GET_META_DATA);
}AndroidManifest.xml to declare QUERY_ALL_PACKAGES only if your app genuinely needs it. In your app's <queries> block, explicitly list the packages you need to query instead of requesting blanket access.Real-World Impact: Why Timing Matters
CVE-2023-21328 was disclosed in March 2023. We're now in 2024, and I still see Indian SMBs running unpatched Android devices. The longer you wait, the more time attackers have to exploit this vulnerability at scale.
In my experience building security for large enterprises, the companies that responded quickly to CVE-2023-21328 (within 30 days) avoided any breaches. Those that waited 6+ months? Several reported incidents where attackers used this vulnerability as the initial reconnaissance step.
Next Steps
- Audit your devices: Do you know which Android versions your employees are running? If not, that's your first red flag.
- Check for updates: Push Android security patches to all devices immediately.
- Implement MDM: If you don't have Mobile Device Management, now is the time.
- Scan with Bachao.AI: Get a free vulnerability assessment to identify other risks you might have missed.
Take 30 minutes today to understand your Android security posture. No credit card required. We'll identify vulnerabilities like CVE-2023-21328 and give you a prioritized remediation plan.
Protect your business with Bachao.AI — India's automated vulnerability assessment and penetration testing platform. Get a comprehensive security scan of your web applications and infrastructure. Visit Bachao.AI to get started.
Frequently Asked Questions
What is CVE-2023-21328? CVE-2023-21328 is an Android security vulnerability that allows attackers to exploit weaknesses in the Android operating system. It was publicly disclosed and patched by Google as part of the Android Security Bulletin.
Why does this affect Indian SMBs? Indian SMBs increasingly rely on Android devices for business operations, from mobile banking to customer communication. Many organizations run BYOD policies with unpatched devices, making them prime targets for attackers exploiting known vulnerabilities like CVE-2023-21328.
How can I protect my organization? Ensure all Android devices in your organization are updated to the latest security patch level. Implement an MDM solution to enforce patch compliance, conduct regular VAPT assessments via platforms like Bachao.AI by Dhisattva AI Pvt Ltd, and align with CERT-In guidelines for incident reporting.
Written by Shouvik Mukherjee, Founder & CEO of Bachao.AI. Follow me on LinkedIn for daily cybersecurity insights for Indian businesses.