/

CVE-2026-24490

Severity:

HIGH RISK

(8.1)

XSS in MobSF Android Manifest Analysis Reports

CVE-2026-24490

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Session Hijacking and Account Takeover via Stored XSS in Analysis Reports

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A stored cross-site scripting (XSS) issue in MobSF prior to version 4.4.5 allows arbitrary JavaScript execution in the browser of anyone viewing generated analysis reports.

By uploading a malicious APK with crafted android:host values in <data android:scheme="android_secret_code"> elements, an attacker can inject script code into the HTML report, potentially leading to session hijacking and account takeover within the MobSF web interface.

Affected context

This vulnerability occurs in MobSF's web-based reporting interface when analyzing Android applications.

Specifically, values from the android:host attribute in <data android:scheme="android_secret_code"> elements within an APK's AndroidManifest.xml are reflected into HTML reports without proper sanitization or encoding.

The risk is present in multi-user or shared MobSF instances where users upload APKs and others view the corresponding analysis reports through a browser.

Exploit preconditions

  • Attack surface: MobSF web UI that displays HTML analysis reports for uploaded Android APKs.
  • Required access: Ability to upload an APK to a MobSF instance (e.g., authenticated user, CI pipeline integration, or exposed upload endpoint).
  • Trigger point: A victim user with access to the MobSF interface opens the HTML report for the malicious APK in their browser.
  • Why exploitation is possible: The android:host attribute from <data android:scheme="android_secret_code"> entries is embedded into the report HTML without output encoding or sanitization, allowing attacker-controlled JavaScript to execute in the victim's browser context.

Why this happens

The core issue is untrusted data from an analyzed APK being inserted into an HTML report without appropriate context-aware escaping or sanitization.

MobSF treats the contents of the android:host attribute as display-only data but renders it directly into the DOM, which maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

Because the report template does not encode characters with special meaning in HTML/JavaScript contexts, an attacker can smuggle script fragments or event handlers that execute when the report is viewed.

Potential impact

  • Execution of arbitrary JavaScript in the browser of users viewing MobSF reports
  • Theft of MobSF session cookies and potential session hijacking
  • Account takeover within the MobSF interface, depending on session handling and roles
  • Unauthorized actions performed on behalf of a victim (e.g., modifying settings, viewing or deleting analysis data)
  • Injection of malicious content that could further pivot to other internal tools or browser-based resources

General mitigation guidance

Effective mitigation focuses on treating all analysis-derived content as untrusted and enforcing robust output encoding:

  • Apply context-aware HTML encoding to all dynamic values, including android:host, before inserting them into report templates.
  • Use templating engines or helper functions that escape output by default, only allowing explicit safe HTML for tightly controlled, vetted content.
  • Normalize and validate manifest fields, rejecting or neutralizing values that contain HTML/JavaScript control characters where they are not semantically required.
  • Isolate report rendering components with strict Content Security Policy (CSP) rules to limit script execution and reduce XSS blast radius.
  • Follow a least-privilege model in the web interface so that a compromised user session has minimal impact on other users and system configuration.

How teams detect issues like this

Organizations can identify similar vulnerabilities by combining static and manual review techniques:

  • Perform static analysis or grep-based scans for places where data derived from APKs, manifests, or other user-controlled artifacts are interpolated directly into HTML.
  • During code review, flag any report templates or views that render unescaped variables from analysis results, especially those originating in XML/manifest parsing.
  • Add automated tests that include payload-like test values in manifest attributes and verify that generated reports display them as text rather than executing them.
  • Integrate security-focused linters or SAST tools configured with rules for CWE-79, focusing on server-side templating contexts used by MobSF or similar tools.

Sources

SourceLink
github.comgithub.com/MobSF/Mobile-Security-Framework-MobSF/commit/2b08dd050e7685ee2a14fdbb454affab94129eae
github.comgithub.com/MobSF/Mobile-Security-Framework-MobSF/releases/tag/v4.4.5
github.comgithub.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-8hf7-h89p-3pqj

Frequently asked

questions

It can be, depending on how MobSF is exposed. If a MobSF instance is accessible over a network and an attacker can upload an APK, they can plant a payload that executes when another user views the report in their browser.

The attacker needs the ability to upload an APK to the MobSF instance or influence an existing upload pipeline. Exploitation then requires a victim with valid access to view the resulting report.

The most robust fix is to apply strict, context-aware output encoding on all data from the Android manifest before rendering it into HTML, and to default to auto-escaping in all report templates.

Adopt a development practice where all user- or file-derived data is treated as untrusted, use templating systems with automatic escaping, add security checks in code review and CI, and enforce defense-in-depth measures such as CSP and least-privilege session design in the web interface.

Find out what's already
exploitable in your codebase.