CVE-2025-31116: Mobile Security Framework (MobSF) SSRF Vulnerability via DNS Rebinding

mobsf Updated 02 Oct 2025

Summary

31/03/2025
Yes i
Moderate
4.4

CVE-2025-31116: The latest deployed fix for the SSRF vulnerability is through the use of the call valid_host(). Affects mobsf versions < 4.3.2. Fixed in 4.3.2. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The Mobile Security Framework (MobSF) is an open-source tool designed for mobile application security testing. It provides features such as static and dynamic analysis, and it is widely used by developers and security professionals to identify vulnerabilities in mobile applications. However, MobSF has been found to have a Server-Side Request Forgery (SSRF) vulnerability that can be exploited through DNS rebinding techniques, potentially allowing attackers to access internal resources.

Vulnerability Detail

The SSRF vulnerability in MobSF arises from the improper validation of hostnames in the 'valid_host' function. This function attempts to ensure that only valid and non-local hosts are processed. However, due to the reliance on 'socket.gethostbyname()', an attacker can manipulate DNS responses to redirect requests to internal services after the initial resolution. This can lead to unauthorized access to sensitive data or services within the network, making it a significant security risk.

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

4.3.2

This is the first release that contains the fix.

pip install --upgrade "mobsf==4.3.2"

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

Workaround

As a temporary workaround, you can modify the 'valid_host' function to avoid using 'socket.gethostbyname()'. Instead, implement a custom hostname validation that does not rely on DNS resolution, ensuring that only explicitly allowed hosts are processed.

Conclusion

The SSRF vulnerability in MobSF poses a significant risk due to its potential for exploitation via DNS rebinding. It is crucial for users of MobSF to update to the latest version to mitigate this risk and to consider implementing additional security measures to validate hostnames.

See every vulnerability recorded for mobsf →

Share this vulnerability

FAQ

The vulnerability is a Server-Side Request Forgery (SSRF) that can be exploited through DNS rebinding, allowing attackers to access internal resources.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to unauthorized access to internal services, data leakage, and other security risks.

Yes, the vulnerability has been patched in version 4.3.2 of the MobSF package. It is recommended to upgrade to this version.

The CVSS score for this vulnerability is 4.4, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for mobsf.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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

4.3.2

This is the first release that contains the fix.

pip install --upgrade "mobsf==4.3.2"

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