Wednesday, February 12, 2025
HomeCVE/vulnerabilityMobSF XSS Vulnerability Let Attackers Inject Malicious Scripts

MobSF XSS Vulnerability Let Attackers Inject Malicious Scripts

Published on

SIEM as a Service

Follow Us on Google News

A critical vulnerability has been identified in the Mobile Security Framework (MobSF) that allows attackers to inject malicious scripts into the system.

This vulnerability, CVE-2024-53999 is a Stored Cross-Site Scripting (XSS) flaw found in the “Diff or Compare” functionality, which occurs due to improper handling of file uploads with script-laden filenames.

Details of the Vulnerability

The vulnerability was discovered in MobSF version 4.2.8 in Github, where the application allows users to upload files with scripts embedded in the filename parameter.

Specifically, the issue arises because the upload feature permits filenames containing special characters such as <, >, /, and “. Such oversights make it possible for a malicious user to upload a script file and set its name to a script value, which the server accepts without validation.

Leveraging 2024 MITRE ATT&CK Results for SME & MSP Cybersecurity Leaders – Attend Free Webinar

This oversight can potentially be mitigated by implementing stricter filename validation. By restricting file uploads to filenames containing only whitelisted characters—such as A-Z, 0-9, and specific special characters like – or _ that are permitted by business requirements—this risk could be significantly reduced.

Proof of Concept (PoC)

To illustrate this vulnerability, a proof of concept was created with the following steps:

  1. Use of Intercepting Proxy: On MobSF version 4.2.8, the “Unload & Analyze” button was clicked, and a file named test.zip was uploaded. During this process, an intercepting proxy tool was used to change the value of the filename parameter from test.zip to <image src onerror=prompt(document.domain)>test.zip.
Use of Intercepting Proxy
Use of Intercepting Proxy
  1. Successful Upload: The altered filename was accepted by the server, and the file was uploaded successfully.
altered filename
altered filename
  1. Script Execution: Upon accessing /recent_scans/, the file <image src onerror=prompt(document.domain)>test.zip appeared in the list. Clicking on the “Differ or Compare” button and selecting this file led to the execution of JavaScript embedded in the filename within the web browser.
Script Execution
Script Execution

The impact of this vulnerability is significant. By allowing a malicious script to be stored in the system via the filename parameter, attackers can access sensitive information belonging to other users or administrators during the comparison process.

impact of the vulnerability
impact of the vulnerability

This flaw not only compromises data confidentiality but also poses a persistent threat as the injected script remains stored in the system.

The MobSF team is urged to implement immediate fixes by validating and sanitizing filename inputs to prevent such vulnerabilities.

In the meantime, users are advised to exercise caution and apply any patches or updates released by the MobSF developers to mitigate these security risks.

Analyse Advanced Malware & Phishing Analysis With ANY.RUN Black Friday Deals : Get up to 3 Free Licenses.

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Latest articles

Ratatouille Malware Bypass UAC Control & Exploits I2P Network to Launch Cyber Attacks

A newly discovered malware, dubbed "Ratatouille" (or I2PRAT), is raising alarms in the cybersecurity...

Sandworm APT Hackers Weaponize Microsoft KMS Activation Tools To Compromise Windows

In a sophisticated cyber-espionage operation, the Russian state-sponsored hacking group Sandworm (APT44), linked to...

Hackers Can Exploit “Wormable” Windows LDAP RCE Vulnerability for Remote Attacks

A critical new vulnerability in Microsoft’s Windows Lightweight Directory Access Protocol (LDAP), tagged as...

Google Chrome’s Safe Browsing Now Protects 1 Billion Users Worldwide

Google's Safe Browsing technology now ensures enhanced protection for over 1 billion Chrome users...

Supply Chain Attack Prevention

Free Webinar - Supply Chain Attack Prevention

Recent attacks like Polyfill[.]io show how compromised third-party components become backdoors for hackers. PCI DSS 4.0’s Requirement 6.4.3 mandates stricter browser script controls, while Requirement 12.8 focuses on securing third-party providers.

Join Vivekanand Gopalan (VP of Products – Indusface) and Phani Deepak Akella (VP of Marketing – Indusface) as they break down these compliance requirements and share strategies to protect your applications from supply chain attacks.

Discussion points

Meeting PCI DSS 4.0 mandates.
Blocking malicious components and unauthorized JavaScript execution.
PIdentifying attack surfaces from third-party dependencies.
Preventing man-in-the-browser attacks with proactive monitoring.

More like this

Ratatouille Malware Bypass UAC Control & Exploits I2P Network to Launch Cyber Attacks

A newly discovered malware, dubbed "Ratatouille" (or I2PRAT), is raising alarms in the cybersecurity...

Sandworm APT Hackers Weaponize Microsoft KMS Activation Tools To Compromise Windows

In a sophisticated cyber-espionage operation, the Russian state-sponsored hacking group Sandworm (APT44), linked to...

Hackers Can Exploit “Wormable” Windows LDAP RCE Vulnerability for Remote Attacks

A critical new vulnerability in Microsoft’s Windows Lightweight Directory Access Protocol (LDAP), tagged as...