CVE-2025-24803: Mobsf Cross-Site Scripting Vulnerability

HIGH
Advisory Identifier: GHSA-cxqq-w3x5-7ph3
CVSS 8.1
CWE-79
Published
Advisory Summary

CVE-2025-24803 is a HIGH (CVSS 8.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Mobsf libraries in the PyPI ecosystem. The issue involves mobsf stored cross-site scripting (xss). Remediation is available by upgrading affected packages to version 4.3.1.

CVE-2025-24803 at a Glance

CVE Identifier CVE-2025-24803
GHSA Identifier GHSA-cxqq-w3x5-7ph3
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Mobsf
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2025-24803

To remediate this vulnerability, upgrade all affected Mobsf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mobsf fixed: 4.3.1
pip install mobsf>=4.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mobsf

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-24803, inspect your installed packages using pip:

pip show mobsf

Analyze the terminal output to locate any version of Mobsf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.3.1), your application is affected.

Note: The pip show mobsf command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Mobsf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

**Product:** MobSF **Version:** < 4.3.1 **CWE-ID:** CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') **CVSS vector v.4.0:** 8.5 (AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N) **CVSS vector v.3.1:** 8.1 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N) **Description:** Stored XSS in the iOS Dynamic Analyzer functionality. **Impact:** Leveraging this vulnerability would enable performing actions as users, including administrative users. **Vulnerable component:** `dynamic_analysis.html` https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/d1d3b7a9aeb1a8c8c7c229a3455b19ade9fa8fe0/mobsf/templates/dynamic_analysis/ios/dynamic_analysis.html#L406 **Exploitation conditions:** A malicious application was uploaded to the Correlium. **Mitigation:** Use `escapeHtml()` function on the `bundle` variable. **Researcher: Oleg Surnin (Positive Technologies)** ## Research Researcher discovered zero-day vulnerability Stored Cross-site Scripting (XSS) in MobSF in iOS Dynamic Analyzer functionality. According to Apple's documentation for bundle ID's, it must contain only alphanumeric characters (A–Z, a–z, and 0–9), hyphens (-), and periods (.). (https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundleidentifier) However, an attacker can manually modify this value in `Info.plist` file and add special characters to the `<key>CFBundleIdentifier</key>` value. In the `dynamic_analysis.html` file you do not sanitize received bundle value from Corellium https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/d1d3b7a9aeb1a8c8c7c229a3455b19ade9fa8fe0/mobsf/templates/dynamic_analysis/ios/dynamic_analysis.html#L406 <img width="1581" alt="image" src="https://github.com/user-attachments/assets/8400f872-46c0-406c-9dd6-97655e499b75" /> *Figure 1. Unsanitized bundle* As a result, it is possible to break the HTML context and achieve Stored XSS. ## Vulnerability reproduction To reproduce the vulnerability, follow the steps described below. • Unzip the IPA file of any iOS application. *Listing 1. Unzipping the file* ``` unzip test.ipa ``` • Modify the value of `<key>CFBundleIdentifier</key>` by adding restricted characters in the `Info.plist` file. <img width="560" alt="image-1" src="https://github.com/user-attachments/assets/3eedf216-45ab-4d73-9815-6b02827d36d4" /> *Figure 2. Example of the modified Bundle Identifier* • Zip the modified IPA file. *Listing 2. Zipping the file* ``` zip -r xss.ipa Payload/ ``` • Upload the modified IPA file to your virtual device using the Correlium platform. <img width="762" alt="image-2" src="https://github.com/user-attachments/assets/7f3e8b0d-d1f9-4d86-b63b-9b3f9e8f1d0c" /> *Figure 3. Example of the uploaded malicious application* • Open the XSS functionality and hover the mouse over the Uninstall button of the malicious app. <img width="764" alt="image-3" src="https://github.com/user-attachments/assets/fd621574-f2c1-42be-b30a-e8e7445c6b13" /> *Figure 4. Example of the 'Uninstall' button* <img width="652" alt="image-4" src="https://github.com/user-attachments/assets/73526f71-6d39-4a94-98bf-8a867aa9acc7" /> *Figure 5. Example of the XSS* <img width="460" alt="image-5" src="https://github.com/user-attachments/assets/13e6a1fc-59be-492d-8e42-a5a8010fc4c3" /> *Figure 6. Example of the vulnerable code* ___________________________ ### Please, assign all credits to: Oleg Surnin (Positive Technologies)

CVE-2025-24803 Affected Mobsf Versions

1 component(s)
Fixed Versions:
4.3.1
Product / Package Ecosystem Affected Versions Fixed Version
mobsf
PyPI
< 4.3.1
4.3.1

References

Frequently Asked Questions

What is CVE-2025-24803?
CVE-2025-24803 is a security vulnerability in Mobsf involving MobSF Stored Cross-Site Scripting (XSS) under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Mobsf versions are affected?
Affected versions include releases prior to 4.3.1 across affected packages: mobsf.
What version fixes CVE-2025-24803?
Upgrading to 4.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mobsf affected?
Yes, mobsf is affected in releases prior to 4.3.1. Upgrade your dependency to 4.3.1 or later.
What is the CVSS score of CVE-2025-24803?
CVE-2025-24803 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2025-24803?
CVE-2025-24803 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check PyPI dependencies for CVE-2025-24803?
Run the dependency tree command: 'pip show mobsf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cxqq-w3x5-7ph3",
  "modified" : "2025-02-05T21:45:22Z",
  "published" : "2025-02-05T20:56:39Z",
  "aliases" : [ "CVE-2025-24803" ],
  "summary" : "MobSF Stored Cross-Site Scripting (XSS)",
  "details" : "**Product:** MobSF\n**Version:** < 4.3.1\n**CWE-ID:** CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')\n**CVSS vector v.4.0:** 8.5 (AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N)\n**CVSS vector v.3.1:** 8.1 (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N)\n**Description:** Stored XSS in the iOS Dynamic Analyzer functionality.\n**Impact:** Leveraging this vulnerability would enable performing actions as users, including administrative users.\n**Vulnerable component:** `dynamic_analysis.html` \nhttps://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/d1d3b7a9aeb1a8c8c7c229a3455b19ade9fa8fe0/mobsf/templates/dynamic_analysis/ios/dynamic_analysis.html#L406\n**Exploitation conditions:** A malicious application was uploaded to the Correlium.\n**Mitigation:** Use `escapeHtml()` function on the `bundle` variable.\n**Researcher: Oleg Surnin (Positive Technologies)**\n\n## Research\nResearcher discovered zero-day vulnerability Stored Cross-site Scripting (XSS) in MobSF in iOS Dynamic Analyzer functionality.\nAccording to Apple's documentation for bundle ID's, it must contain only alphanumeric characters (A–Z, a–z, and 0–9), hyphens (-), and periods (.).\n(https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundleidentifier)\nHowever, an attacker can manually modify this value in `Info.plist` file and add special characters to the `<key>CFBundleIdentifier</key>` value.\nIn the `dynamic_analysis.html` file you do not sanitize received bundle value from Corellium \nhttps://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/d1d3b7a9aeb1a8c8c7c229a3455b19ade9fa8fe0/mobsf/templates/dynamic_analysis/ios/dynamic_analysis.html#L406\n\n<img width=\"1581\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8400f872-46c0-406c-9dd6-97655e499b75\" />\n\n*Figure 1. Unsanitized bundle*\n\nAs a result, it is possible to break the HTML context and achieve Stored XSS.\n\n## Vulnerability reproduction\n\nTo reproduce the vulnerability, follow the steps described below.\n\n•\tUnzip the IPA file of any iOS application.\n*Listing 1. Unzipping the file*\n```\nunzip test.ipa\n```\n•\tModify the value of `<key>CFBundleIdentifier</key>` by adding restricted characters in the `Info.plist` file.\n\n<img width=\"560\" alt=\"image-1\" src=\"https://github.com/user-attachments/assets/3eedf216-45ab-4d73-9815-6b02827d36d4\" />\n\n*Figure 2. Example of the modified Bundle Identifier*\n\n•\tZip the modified IPA file.\n\n*Listing 2. Zipping the file*\n```\nzip -r xss.ipa Payload/\n```\n•\tUpload the modified IPA file to your virtual device using the Correlium platform.\n \n<img width=\"762\" alt=\"image-2\" src=\"https://github.com/user-attachments/assets/7f3e8b0d-d1f9-4d86-b63b-9b3f9e8f1d0c\" />\n\n*Figure 3. Example of the uploaded malicious application*\n\n•\tOpen the XSS functionality and hover the mouse over the Uninstall button of the malicious app.\n\n<img width=\"764\" alt=\"image-3\" src=\"https://github.com/user-attachments/assets/fd621574-f2c1-42be-b30a-e8e7445c6b13\" />\n\n*Figure 4. Example of the 'Uninstall' button*\n\n <img width=\"652\" alt=\"image-4\" src=\"https://github.com/user-attachments/assets/73526f71-6d39-4a94-98bf-8a867aa9acc7\" />\n \n*Figure 5. Example of the XSS*\n \n<img width=\"460\" alt=\"image-5\" src=\"https://github.com/user-attachments/assets/13e6a1fc-59be-492d-8e42-a5a8010fc4c3\" />\n\n*Figure 6. Example of the vulnerable code*\n\n___________________________\n\n### Please, assign all credits to: Oleg Surnin (Positive Technologies)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mobsf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.3.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.3.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-cxqq-w3x5-7ph3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24803"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/05206e72cae35b311615a70e51e1a946955c5e83"
  }, {
    "type" : "WEB",
    "url" : "https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundleidentifier"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/blob/d1d3b7a9aeb1a8c8c7c229a3455b19ade9fa8fe0/mobsf/templates/dynamic_analysis/ios/dynamic_analysis.html#L406"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-02-05T20:56:39Z",
    "nvd_published_at" : "2025-02-05T19:15:46Z"
  }
}