CVE-2024-41955: Mobsf MobSF Vulnerable To Open Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-8m9j-2f32-2vx4
CVSS 5.2
CWE-601
Published
Advisory Summary

CVE-2024-41955 is a MODERATE (CVSS 5.2) mobsf vulnerable to open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Mobsf libraries in the PyPI ecosystem. The issue involves mobsf vulnerable to open redirect in login redirect. Remediation is available by upgrading affected packages to version 4.0.5.

CVE-2024-41955 at a Glance

CVE Identifier CVE-2024-41955
GHSA Identifier GHSA-8m9j-2f32-2vx4
Severity MODERATE
CVSS v3.1 Base Score 5.2
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Mobsf
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-41955

To remediate this vulnerability, upgrade all affected Mobsf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mobsf fixed: 4.0.5
pip install mobsf>=4.0.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show mobsf

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-41955, inspect your installed packages using pip:

pip show mobsf

Analyze the terminal output to locate any version of Mobsf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.5), your application is affected.

Note: The pip show mobsf command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Mobsf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact _What kind of vulnerability is it? Who is impacted?_ An open redirect vulnerability exist in MobSF authentication view. PoC 1. Go to http://127.0.0.1:8000/login/?next=//afine.com in a web browser. 2. Enter credentials and press "Sign In". 3. You will be redirected to [afine.com](http://afine.com/) Users who are not using authentication are not impacted. ### Patches _Has the problem been patched? What versions should users upgrade to?_ Update to MobSF v4.0.5 ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ Disable Authentication ### References _Are there any links users can visit to find out more?_ Fix: https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/fdaad81314f393d324c1ede79627e9d47986c8c8 ### Reporter Marcin Węgłowski (AFINE Team)

CVE-2024-41955 Affected Mobsf Versions

1 component(s)
Fixed Versions:
4.0.5
Product / Package Ecosystem Affected Versions Fixed Version
mobsf
PyPI
< 4.0.5
4.0.5

References

Frequently Asked Questions

What is CVE-2024-41955?
CVE-2024-41955 is a security vulnerability in Mobsf involving MobSF vulnerable to Open Redirect in Login Redirect under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Mobsf versions are affected?
Affected versions include releases prior to 4.0.5 across affected packages: mobsf.
What version fixes CVE-2024-41955?
Upgrading to 4.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mobsf affected?
Yes, mobsf is affected in releases prior to 4.0.5. Upgrade your dependency to 4.0.5 or later.
What is the CVSS score of CVE-2024-41955?
CVE-2024-41955 has a CVSS v3.1 base score of 5.2 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2024-41955?
CVE-2024-41955 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check PyPI dependencies for CVE-2024-41955?
Run the dependency tree command: 'pip show mobsf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8m9j-2f32-2vx4",
  "modified" : "2024-08-02T15:58:47Z",
  "published" : "2024-07-31T20:54:08Z",
  "aliases" : [ "CVE-2024-41955" ],
  "summary" : "MobSF vulnerable to Open Redirect in Login Redirect",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nAn open redirect vulnerability exist in MobSF authentication view. \n\nPoC\n1. Go to http://127.0.0.1:8000/login/?next=//afine.com in a web browser.\n2. Enter credentials and press \"Sign In\".\n3. You will be redirected to [afine.com](http://afine.com/)\n\nUsers who are not using authentication are not impacted.\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\nUpdate to MobSF v4.0.5\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\nDisable Authentication\n\n### References\n_Are there any links users can visit to find out more?_\nFix: https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/fdaad81314f393d324c1ede79627e9d47986c8c8\n\n### Reporter\nMarcin Węgłowski (AFINE Team)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mobsf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-8m9j-2f32-2vx4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-41955"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/fdaad81314f393d324c1ede79627e9d47986c8c8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-31T20:54:08Z",
    "nvd_published_at" : "2024-07-31T20:15:06Z"
  }
}