CVE-2026-68927: Mobsf MobSF Has SSRF Port Restriction Vulnerability

LOW
Advisory Identifier: GHSA-95px-34x5-p37h
CVSS 3.0
CWE-918
Published
Advisory Summary

CVE-2026-68927 is a LOW (CVSS 3.0) mobsf has ssrf port restriction vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Mobsf libraries in the PyPI ecosystem. The issue involves mobsf has ssrf port restriction bypass in assetlinks_check. Remediation is available by upgrading affected packages to version 4.5.1.

CVE-2026-68927 at a Glance

CVE Identifier CVE-2026-68927
GHSA Identifier GHSA-95px-34x5-p37h
Severity LOW
CVSS v3.1 Base Score 3.0
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Mobsf
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.0

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

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

How to Fix CVE-2026-68927

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.5.1
pip install mobsf>=4.5.1
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-2026-68927, 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.5.1), 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. 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

## Summary MobSF's Android App Link assetlinks checker validates only the manifest `android:host` value with `valid_host()`, but then appends the separate `android:port` value into the URL used for the server-side request. This bypasses the current port restriction in `valid_host()` and lets a crafted APK cause MobSF to fetch `http://host:<attacker-port>/.well-known/assetlinks.json` or `https://host:<attacker-port>/.well-known/assetlinks.json`. ## Impact An authenticated user who can upload or trigger analysis of a crafted APK can cause the MobSF server to make an outbound request to an attacker-selected port during Android manifest analysis. When the host is controlled by the attacker and uses DNS rebinding, the validation lookup can resolve to a public IP while the later HTTP client lookup resolves to an internal address, allowing SSRF to internal services on non-80/443 ports. This is not arbitrary URL SSRF. The path remains fixed to `/.well-known/assetlinks.json`, and redirects are disabled. The bypass is that the final fetched URL is assembled after the host-only validation, so the current port guard is not applied to the actual URL. ## Root cause `valid_host()` rejects ports other than 80 and 443 when a port is included in the string being validated: ```python port = parsed.port ... if port and port not in (80, 443): return False ``` In `get_browsable_activities()`, only the host attribute is passed to `valid_host()`: ```python host = data.getAttribute(f'{ns}:host') port = data.getAttribute(f'{ns}:port') ... if not valid_host(host): logger.warning('Invalid Host: %s', host) continue shost = f'{scheme}://{host}' if port and is_number(port): c_url = f'{shost}:{port}{WELL_KNOWN_PATH}' else: c_url = f'{shost}{WELL_KNOWN_PATH}' well_known[c_url] = shost ``` `_check_url()` then fetches the assembled URL after checking only path, query, and params: ```python purl = urlparse(url) if (purl.path != WELL_KNOWN_PATH or len(purl.query) > 0 or len(purl.params) > 0): logger.warning('Invalid Assetlinks URL: %s', url) continue r = requests.get(url, timeout=5, allow_redirects=False, proxies=proxies, verify=verify) ``` ## Reproduction Use an Android manifest with a browsable App Link data tag that has a benign-looking host and a restricted port: ```xml <activity android:name=".DeepLink" android:exported="true"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="http" android:host="rebind.example" android:port="22" /> </intent-filter> </activity> ``` A safe local proof with DNS and HTTP monkeypatching shows that MobSF validates only `rebind.example`, then fetches a URL that preserves the unchecked port: ```text well_known map: {'http://rebind.example:22/.well-known/assetlinks.json': 'http://rebind.example'} requests.get calls: [('http://rebind.example:22/.well-known/assetlinks.json', {'timeout': 5, 'allow_redirects': False, 'proxies': None, 'verify': True})] findings: [{'url': 'http://rebind.example:22/.well-known/assetlinks.json', 'host': 'http://rebind.example', 'status_code': 200, 'status': True}] VULNERABLE: valid_host validated only rebind.example, but assetlinks_check fetched unchecked port 22 via http://rebind.example:22/.well-known/assetlinks.json ``` The same code pattern is present in latest release `v4.4.6` and current main. ## Remediation Validate the final URL after all manifest components have been applied. In particular: 1. Build `c_url`, then run validation on the full URL, including scheme, hostname, port, path, query, and params. 2. Reject `android:port` values other than 80 and 443 before appending them to the URL. 3. Prevent DNS rebinding by pinning the validated DNS result to the outbound connection or otherwise ensuring the actual HTTP request cannot resolve to a different address than the validation step. 4. Keep `allow_redirects=False` for the existing redirect mitigation.

CVE-2026-68927 Affected Mobsf Versions

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

References

Frequently Asked Questions

What is CVE-2026-68927?
CVE-2026-68927 is a security vulnerability in Mobsf involving MobSF has SSRF port restriction bypass in assetlinks_check under CWE-918: Server-Side Request Forgery (SSRF).
Which Mobsf versions are affected?
Affected versions include releases prior to 4.5.1 across affected packages: mobsf.
What version fixes CVE-2026-68927?
Upgrading to 4.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mobsf affected?
Yes, mobsf is affected in releases prior to 4.5.1. Upgrade your dependency to 4.5.1 or later.
What is the CVSS score of CVE-2026-68927?
CVE-2026-68927 has a CVSS v3.1 base score of 3.0 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2026-68927?
CVE-2026-68927 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for CVE-2026-68927?
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-95px-34x5-p37h",
  "modified" : "2026-08-18T18:01:03Z",
  "published" : "2026-08-18T18:01:03Z",
  "aliases" : [ "CVE-2026-68927" ],
  "summary" : "MobSF has SSRF port restriction bypass in assetlinks_check",
  "details" : "## Summary\n\nMobSF's Android App Link assetlinks checker validates only the manifest `android:host` value with `valid_host()`, but then appends the separate `android:port` value into the URL used for the server-side request. This bypasses the current port restriction in `valid_host()` and lets a crafted APK cause MobSF to fetch `http://host:<attacker-port>/.well-known/assetlinks.json` or `https://host:<attacker-port>/.well-known/assetlinks.json`.\n\n## Impact\n\nAn authenticated user who can upload or trigger analysis of a crafted APK can cause the MobSF server to make an outbound request to an attacker-selected port during Android manifest analysis. When the host is controlled by the attacker and uses DNS rebinding, the validation lookup can resolve to a public IP while the later HTTP client lookup resolves to an internal address, allowing SSRF to internal services on non-80/443 ports.\n\nThis is not arbitrary URL SSRF. The path remains fixed to `/.well-known/assetlinks.json`, and redirects are disabled. The bypass is that the final fetched URL is assembled after the host-only validation, so the current port guard is not applied to the actual URL.\n\n## Root cause\n\n`valid_host()` rejects ports other than 80 and 443 when a port is included in the string being validated:\n\n```python\nport = parsed.port\n...\nif port and port not in (80, 443):\n    return False\n```\n\nIn `get_browsable_activities()`, only the host attribute is passed to `valid_host()`:\n\n```python\nhost = data.getAttribute(f'{ns}:host')\nport = data.getAttribute(f'{ns}:port')\n...\nif not valid_host(host):\n    logger.warning('Invalid Host: %s', host)\n    continue\nshost = f'{scheme}://{host}'\nif port and is_number(port):\n    c_url = f'{shost}:{port}{WELL_KNOWN_PATH}'\nelse:\n    c_url = f'{shost}{WELL_KNOWN_PATH}'\nwell_known[c_url] = shost\n```\n\n`_check_url()` then fetches the assembled URL after checking only path, query, and params:\n\n```python\npurl = urlparse(url)\nif (purl.path != WELL_KNOWN_PATH\n    or len(purl.query) > 0\n        or len(purl.params) > 0):\n    logger.warning('Invalid Assetlinks URL: %s', url)\n    continue\nr = requests.get(url,\n                 timeout=5,\n                 allow_redirects=False,\n                 proxies=proxies,\n                 verify=verify)\n```\n\n## Reproduction\n\nUse an Android manifest with a browsable App Link data tag that has a benign-looking host and a restricted port:\n\n```xml\n<activity android:name=\".DeepLink\" android:exported=\"true\">\n  <intent-filter>\n    <action android:name=\"android.intent.action.VIEW\" />\n    <category android:name=\"android.intent.category.BROWSABLE\" />\n    <category android:name=\"android.intent.category.DEFAULT\" />\n    <data android:scheme=\"http\" android:host=\"rebind.example\" android:port=\"22\" />\n  </intent-filter>\n</activity>\n```\n\nA safe local proof with DNS and HTTP monkeypatching shows that MobSF validates only `rebind.example`, then fetches a URL that preserves the unchecked port:\n\n```text\nwell_known map: {'http://rebind.example:22/.well-known/assetlinks.json': 'http://rebind.example'}\nrequests.get calls: [('http://rebind.example:22/.well-known/assetlinks.json', {'timeout': 5, 'allow_redirects': False, 'proxies': None, 'verify': True})]\nfindings: [{'url': 'http://rebind.example:22/.well-known/assetlinks.json', 'host': 'http://rebind.example', 'status_code': 200, 'status': True}]\nVULNERABLE: valid_host validated only rebind.example, but assetlinks_check fetched unchecked port 22 via http://rebind.example:22/.well-known/assetlinks.json\n```\n\nThe same code pattern is present in latest release `v4.4.6` and current main.\n\n## Remediation\n\nValidate the final URL after all manifest components have been applied. In particular:\n\n1. Build `c_url`, then run validation on the full URL, including scheme, hostname, port, path, query, and params.\n2. Reject `android:port` values other than 80 and 443 before appending them to the URL.\n3. Prevent DNS rebinding by pinning the validated DNS result to the outbound connection or otherwise ensuring the actual HTTP request cannot resolve to a different address than the validation step.\n4. Keep `allow_redirects=False` for the existing redirect mitigation.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mobsf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.5.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-95px-34x5-p37h"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/pull/2627"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/62563ca429a75b3e5d47a13b958e1d2e7d5e2bbf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MobSF/Mobile-Security-Framework-MobSF/releases/tag/v4.5.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-18T18:01:03Z",
    "nvd_published_at" : null
  }
}