CVE-2025-31116: MobSF Vulnerability in DNS Rebinding Leading to SSRF

mobsf Updated 02 Oct 2025

Summary

31/03/2025
Yes i
Moderate
9.8

CVE-2025-31116: Mobile Security Framework (MobSF) is a pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis. Affects mobsf across 2 version ranges.

< 4.3.2 < 4b8bab5a9858c69fe13be4631b82d82186e0d3bd

Fixed in 4b8bab5a9858c69fe13be4631b82d82186e0d3bd. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Mobile Security Framework (MobSF) is a comprehensive pen-testing, malware analysis, and security assessment framework. It is designed to perform both static and dynamic analysis of mobile applications, making it a vital tool for security professionals. However, MobSF has a vulnerability that affects its valid_host() function, which can be exploited through DNS rebinding techniques, potentially leading to Server-Side Request Forgery (SSRF) attacks.

Vulnerability Detail

The vulnerability arises from the use of socket.gethostbyname() in the valid_host() function, which is susceptible to DNS rebinding attacks. This flaw allows an attacker to manipulate DNS responses, tricking the application into making requests to unintended hosts. The ramifications of this vulnerability can be severe, as it may lead to unauthorized access to internal services, data leakage, or further exploitation of the system. The vulnerability has been assigned a CVSS score of 9.8, indicating its critical nature.

How To Fix

Latest published version: 4.5.3 as of 23 Oct 2026

pip install --upgrade "mobsf==4.5.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4b8bab5a9858c69fe13be4631b82d82186e0d3bd

This is the first release that contains the fix.

pip install --upgrade "mobsf==4b8bab5a9858c69fe13be4631b82d82186e0d3bd"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the vulnerable functionality until the package has been updated. Additionally, consider implementing network-level protections to mitigate the risk of DNS rebinding attacks.

Conclusion

The vulnerability identified as CVE-2025-31116 in MobSF poses a significant risk due to its potential for SSRF attacks. Users are strongly advised to update to the patched version 4.3.2 or later to mitigate this risk. Additionally, utilizing tools like Vulert can help monitor and manage open-source vulnerabilities effectively.

See every vulnerability recorded for mobsf →

Share this vulnerability

FAQ

CVE-2025-31116 is a vulnerability in the Mobile Security Framework (MobSF) that allows for Server-Side Request Forgery (SSRF) attacks due to improper handling of DNS responses.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor and alert for open-source vulnerabilities without requiring any installation.

Exploitation of this vulnerability can lead to unauthorized access to internal services, data leakage, and potential further exploitation of the system.

You can update MobSF by running the command pip install --upgrade mobsf in your terminal or command prompt.

DNS rebinding is a technique that allows an attacker to manipulate DNS responses to redirect requests from a victim's browser to an internal network, potentially exposing sensitive services.

Related vulnerabilities

Recent vulnerabilities recorded for mobsf.

How To Fix

Latest published version: 4.5.3 as of 23 Oct 2026

pip install --upgrade "mobsf==4.5.3"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4b8bab5a9858c69fe13be4631b82d82186e0d3bd

This is the first release that contains the fix.

pip install --upgrade "mobsf==4b8bab5a9858c69fe13be4631b82d82186e0d3bd"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback