Skip to content
Back to Blog
·8 min read·news

Android Package Manager Flaw: Why Your App Permissions Aren't Safe

CVE-2023-21326 exposes a critical side-channel vulnerability in Android's Package Manager Service. Learn how attackers can detect installed apps without perm...

BR

Bachao.AI Research Team

Cybersecurity Research

Source: NIST NVD

See If You're Exposed
Android Package Manager Flaw: Why Your App Permissions Aren't Safe

Business impact of this development

Emerging threats move fast. Indian SMBs are primary targets because they're under-defended. Here's what you need to know and do now.

The Vulnerability That Breaks Android's Permission Model

In early 2023, security researchers discovered a critical flaw in Android's Package Manager Service that fundamentally undermines one of Android's core security features: the app permission system. Identified as CVE-2023-21326, this vulnerability allows attackers to determine which apps are installed on a device without requesting any permissions—a capability that should have been impossible.

What makes this particularly dangerous is the attack vector: a side-channel information disclosure. This isn't a dramatic zero-day that crashes systems or grants root access. Instead, it's a subtle weakness that leaks information through timing differences, resource consumption patterns, or error messages. An attacker can exploit this through a local app—one that's already installed on the device—to silently enumerate all other installed applications.

Originally reported by NIST NVD, this vulnerability affects multiple Android versions and has significant implications for enterprise security, user privacy, and the Indian startup ecosystem that increasingly relies on Android-based mobile applications.

100%of Android devices potentially affected
Local execution requiredAttack complexity
No user interaction neededExploitation barrier
Unlimited scopeInformation disclosure impact

Why This Matters for Indian Businesses

If you're running a mobile app—whether it's a fintech app handling UPI payments, a health-tech platform storing medical records, or an e-commerce app processing customer data—this vulnerability directly impacts your data security posture and regulatory compliance.

India's Digital Personal Data Protection (DPDP) Act, which came into force in August 2023, explicitly requires businesses to implement reasonable security measures to protect personal data. When an attacker can silently enumerate installed apps, they gain intelligence about:

    1. Banking and payment apps a user has installed (revealing financial behavior)
    2. Health apps (revealing medical conditions)
    3. Dating or messaging apps (revealing personal relationships)
    4. Security apps (revealing what defenses are in place)
This information becomes a reconnaissance tool for follow-up attacks. An attacker who knows you have a banking app installed can craft a more targeted phishing campaign. If they see you have a password manager, they know to focus on keylogging attacks.

Under the DPDP Act, you're liable for breaches involving personal data—and this includes information about which apps users have installed, as it can be linked to behavioral profiling. The CERT-In 6-hour incident reporting mandate means if your app is compromised through this vector, you have just 6 hours to report it.

In my years building enterprise systems for Fortune 500 companies, I've seen how these "information disclosure" vulnerabilities are often the first step in sophisticated attack chains. They're the reconnaissance phase that precedes the real breach.

⚠️
WARNING
If your business operates in India and collects user data through mobile apps, CVE-2023-21326 is not just a technical issue—it's a compliance liability under the DPDP Act.

Technical Breakdown: How the Attack Works

Let me walk you through exactly how this vulnerability functions and why it's so dangerous:

The Side-Channel Attack Flow

graph TD A["Malicious App Installed
(Needs No Permissions)"] -->|queries| B["Package Manager Service"] B -->|timing differences| C["Side-Channel Leak"] C -->|analyzes| D["Detects App Installation
(e.g., Banking App)"] D -->|repeats for| E["All Installed Apps"] E -->|builds| F["Complete App Inventory"] F -->|uses for| G["Targeted Attack Planning"]

What's Actually Happening

Android's Package Manager Service is a core system service that manages app installations, permissions, and app metadata. Normally, if an app wants to check whether another app is installed, it must:

  1. Request the QUERY_ALL_PACKAGES permission
  2. Declare this in its manifest
  3. Have the user see this permission request during installation
However, CVE-2023-21326 exploits a side-channel in how the Package Manager responds to queries. Instead of directly returning "yes, this app is installed," the service leaks this information indirectly through:
    1. Response timing: Queries for installed apps take measurably different time than queries for non-existent apps
    2. Exception handling: Different error messages or stack traces reveal whether an app exists
    3. Resource allocation: The system allocates resources differently based on whether the queried package exists

Practical Exploitation Example

Here's a simplified example of how an attacker might exploit this:

java
// Vulnerable code pattern in Package Manager Service
// (Simplified for illustration)

public PackageInfo getPackageInfo(String packageName) {
    // Check if package exists
    if (mPackages.containsKey(packageName)) {
        // VULNERABLE: This check itself can be timed
        return mPackages.get(packageName);
    }
    // Different code path for non-existent packages
    throw new PackageManager.NameNotFoundException();
}

An attacker's app can measure the response time:

java
// Attacker's reconnaissance code
private boolean isAppInstalled(String packageName) {
    long startTime = System.nanoTime();
    try {
        PackageInfo info = getPackageManager().getPackageInfo(
            packageName, 
            PackageManager.GET_META_DATA
        );
    } catch (PackageManager.NameNotFoundException e) {
        // App not found
    }
    long endTime = System.nanoTime();
    long duration = endTime - startTime;
    
    // If duration is significantly different, app is likely installed
    // Threshold determined through statistical analysis
    return duration > TIMING_THRESHOLD;
}

By calling this for hundreds of known app packages and measuring response times, an attacker builds a complete inventory of installed apps—all without requesting a single permission.

🛡️
SECURITY
The vulnerability exists because the Package Manager Service doesn't have constant-time execution paths. Different code branches complete at different speeds, leaking information through timing side-channels.

Know your vulnerabilities before attackers do

Run a free VAPT scan — takes 5 minutes, no signup required.

Book Your Free Scan

How to Protect Your Business

If you develop Android apps or deploy them in your organization, here's a structured approach to mitigate this risk:

Immediate Actions

Protection LayerSpecific ActionDifficultyTimeline
OS UpdatesPush Android security patches (March 2023+) to all devicesEasyImmediate
App ManifestAudit and remove unnecessary QUERY_ALL_PACKAGES permissionsEasy1-2 days
Runtime PermissionsImplement runtime permission checks; don't assume permissions persistMedium1 week
Data MinimizationDon't collect or store lists of user's installed appsMedium1-2 weeks
Network IsolationRestrict which apps can communicate with backend serversHard2-4 weeks
Device ManagementDeploy MDM solutions for enterprise devicesHard1 month

Quick Fix: Check Your App's Permissions

If you maintain an Android app, audit your AndroidManifest.xml immediately:

xml
<!-- Check for these permissions and remove if unnecessary -->
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

<!-- Also check for these legacy permissions -->
<uses-permission android:name="android.permission.GET_INSTALLED_APPS" />

If you genuinely need to query specific packages (e.g., for payment gateway integration), use a targeted approach:

xml
<!-- Instead of QUERY_ALL_PACKAGES, use queries element -->
<queries>
    <package android:name="com.google.android.gms" />
    <package android:name="com.whatsapp" />
    <!-- List only packages you actually need -->
</queries>

For Enterprise Deployments

If your organization deploys Android devices for employees, implement these controls:

bash
# Using Android Device Policy (ADP) or MDM solution
# Example: Restrict app installation to managed Google Play

adb shell settings put secure managed_provisioning_allowed 1

# Enforce OS version minimum
adb shell settings put global require_password_to_decrypt 1

# Disable unknown sources
adb shell settings put secure install_non_market_apps 0
💡
TIP
Implement a runtime app inventory system: Have your backend periodically request device information from your app, rather than relying on apps to enumerate what's installed. This gives you accurate data and prevents side-channel attacks from revealing your app's presence.

The Broader Security Implications

What concerns me most about CVE-2023-21326—and this is something I've observed across hundreds of Indian SMB security assessments—is how these "information disclosure" vulnerabilities are systematically underestimated.

They don't crash systems. They don't steal data directly. But they're the reconnaissance phase of sophisticated attacks. In my experience architecting security for large enterprises, we always said: "The attacker who knows what they're looking for is far more dangerous than the one who's blindly searching."

This vulnerability gives attackers exactly that advantage: precise knowledge of the attack surface.

This is exactly why I built Bachao.AI—to make this kind of protection accessible to Indian startups and SMBs who don't have enterprise security teams. CVE-2023-21326 is a perfect example: it's a real, exploitable vulnerability affecting millions of devices, but the fix requires understanding Android internals that most app developers haven't been trained on.

Next Steps

  1. If you develop Android apps: Audit your permissions today. Use our free VAPT scan to identify side-channel vulnerabilities.
  1. If you're an enterprise deploying Android devices: Review your MDM policies and ensure all devices are running March 2023 security patches or later.
  1. If you handle user data: Ensure your DPDP compliance program accounts for app-level information disclosure. This is a reportable security incident under CERT-In guidelines.
Book Your Free Android Security Scan →

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-21326? CVE-2023-21326 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-21326.

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.

BR

Bachao.AI Research Team

Cybersecurity Research

AI-powered security research and threat intelligence from the Bachao.AI team. Covering the latest vulnerabilities, CVEs, and cybersecurity developments affecting Indian businesses.

Get cybersecurity insights for Indian SMBs

Weekly vulnerability alerts, DPDP compliance tips, and security guides. No spam — unsubscribe anytime.

We respect your privacy. Your email is never shared.

Run a free scan — get results in minutes

Free automated scan — risk score in under 2 hours. No credit card required.

See If You're Exposed
Find your vulnerabilitiesStart free scan →