CVE-2025-31116
Python vulnerability analysis and mitigation

Overview

Mobile Security Framework (MobSF), a pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis, was found to contain a Server-Side Request Forgery (SSRF) vulnerability in versions 4.3.1 and earlier. The vulnerability exists in the mitigation for CVE-2024-29190 where the valid_host() function uses socket.gethostbyname(), making it vulnerable to SSRF abuse using DNS rebinding technique (GitHub Advisory).

Technical details

The vulnerability stems from the use of socket.gethostbyname() in the valid_host() function's SSRF protection mechanism. The function performs a single DNS lookup to verify that the IP address is not in an excluded subnet range. However, this protection can be bypassed through DNS rebinding attacks, where an initial DNS resolution points to an allowed IP (like 1.1.1.1), but subsequent resolutions point to restricted IPs (like 127.0.0.1). The vulnerability has been assigned a CVSS v3.1 base score of 4.4 (Medium) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:L (GitHub Advisory).

Impact

The vulnerability allows attackers to perform Server-Side Request Forgery (SSRF) attacks, potentially enabling unauthorized access to internal resources and services. This could lead to data exposure, internal system reconnaissance, and potential service disruption (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 4.3.2 of MobSF. The fix involves avoiding the use of socket.gethostbyname() since it issues DNS queries that can be manipulated. Users are advised to upgrade to version 4.3.2 or later to receive the security fix (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-5882-5rx9-xgxpCRITICAL10
  • PythonPython
  • crawl4ai
NoYesJan 16, 2026
CVE-2026-23949HIGH8.6
  • PythonPython
  • jaraco.context
NoYesJan 20, 2026
GHSA-vx9w-5cx4-9796HIGH8.6
  • PythonPython
  • crawl4ai
NoYesJan 16, 2026
CVE-2026-23535HIGH8
  • PythonPython
  • wlc
NoYesJan 16, 2026
CVE-2026-23490HIGH7.5
  • PythonPython
  • fence-agents-intelmodular
NoYesJan 16, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management