diff --git a/advisories/github-reviewed/2025/02/GHSA-cxqq-w3x5-7ph3/GHSA-cxqq-w3x5-7ph3.json b/advisories/github-reviewed/2025/02/GHSA-cxqq-w3x5-7ph3/GHSA-cxqq-w3x5-7ph3.json new file mode 100644 index 00000000000..68e608d95bc --- /dev/null +++ b/advisories/github-reviewed/2025/02/GHSA-cxqq-w3x5-7ph3/GHSA-cxqq-w3x5-7ph3.json @@ -0,0 +1,76 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-cxqq-w3x5-7ph3", + "modified": "2025-02-05T20:56:39Z", + "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 `CFBundleIdentifier` 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\"image\"\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 `CFBundleIdentifier` by adding restricted characters in the `Info.plist` file.\n\n\"image-1\"\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\"image-2\"\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\"image-3\"\n\n*Figure 4. Example of the 'Uninstall' button*\n\n \"image-4\"\n \n*Figure 5. Example of the XSS*\n \n\"image-5\"\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": "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": null + } +} \ No newline at end of file