🛡️ CVE-2026-33545 — mobile-security-framework

🟡 CVSS 5.3 — Medium ⚠️ Exploit Public CWE-89 NVD
5.3
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

MobSF has SQL Injection in its SQLite Database Viewer Utils

Description

MobSF's read_sqlite() function in mobsf/MobSF/utils.py (lines 542-566) uses Python string formatting (%) to construct SQL queries with table names read from a SQLite database's sqlite_master table. When a security analyst uses MobSF to analyze a malicious mobile application containing a crafted SQLite database, attacker-controlled table names are interpolated directly into SQL queries without parameterization or escaping.

This allows an attacker to:

1. Cause Denial of Service -- A malicious table name causes the database viewer to crash, preventing the analyst from viewing ANY data in the SQLite database. A malicious app can use this to hide sensitive data (C2 server URLs, stolen credentials, API keys) from MobSF's analysis.

2. Achieve SQL Injection -- The SELECT * FROM query on line 557 is provably injectable via UNION SELECT, allowing attacker-controlled data to be returned in query results. The current code structure (a PRAGMA statement that runs first on line 553) limits the full exploitation chain, but the underlying code is verifiably injectable.

Root Cause

The vulnerable code in mobsf/MobSF/utils.py:542-566:

```python

def read_sqlite(sqlite_file):

"""Sqlite Dump - Readable Text."""

table_dict = {}

try:

con = sqlite3.connect(sqlite_file)

cur = con.cursor()

cur.execute('SELECT name FROM sqlite_master WHERE type=\'table\';')

tables = cur.fetchall()

for table in tables:

table_dict[table[0]] = {'head': [], 'data': []}

cur.execute('PRAGMA table_info(\'%s\')' % table) # <-- INJECTION POINT 1

rows = cur.fetchall()

for sq_row in rows:

table_dict[table[0]]['head'].append(sq_row[1])

cur.execute('SELECT * FROM \'%s\'' % table) # <-- INJECTION POINT 2

rows = cur.fetchall()

for sq_row in rows:

tmp_row = []

for each_row in sq_row:

tmp_row.append(str(each_row))

table_dict[table[0]]['data'].append(tmp_row)

except Exception:

logger.exception('Reading SQLite db')

return table_dict

```

Lines 553 and 557 use % string formatting to interpolate table (a tuple from sqlite_master) directly into SQL strings. The table value is attacker-controlled when the SQLite database originates from a malicious application being analyzed.

Attack Vector

The read_sqlite() function is called from two locations:

1. Dynamic Analysis File Viewer (mobsf/DynamicAnalyzer/views/common/device.py:64):

  • Triggered when an analyst clicks to view a .db file in device data
  • Applies to both Android and iOS dynamic analysis

2. iOS Static Analysis File Viewer (mobsf/StaticAnalyzer/views/ios/views/view_source.py:123):

  • Triggered when an analyst clicks to view a .db file during iOS static analysis

Attack Scenario

1. Attacker creates a malicious Android APK (or iOS IPA) containing a SQLite database with a crafted table name in the assets/ directory

2. The SQLite database contains a table created with:

```sql

CREATE TABLE "x' UNION SELECT 'SQL_INJECTION_PROOF'--" (id INTEGER);

```

3. Security analyst uploads the application to MobSF for analysis

4. Analyst browses the extracted files and clicks to view the SQLite database

5. MobSF's read_sqlite() reads table names from sqlite_master, including the malicious name x' UNION SELECT 'SQL_INJECTION_PROOF'--

6. The table name is interpolated into SQL queries via string formatting:

  • PRAGMA table_info('x' UNION SELECT 'SQL_INJECTION_PROOF'--') -- causes syntax error (DoS)
  • SELECT * FROM 'x' UNION SELECT 'SQL_INJECTION_PROOF'--' -- SQL injection (UNION SELECT returns attacker data)

Impact

Denial of Service (Confirmed)

When the malicious table name is the first table in sqlite_master (i.e., created first in the database), the PRAGMA statement on line 553 raises a sqlite3.OperationalError, which is caught by the outer try/except. This causes read_sqlite() to return an empty or partial result, preventing the analyst from viewing any database content.

Security impact: A malicious app author can use this technique to hide incriminating data stored in SQLite databases from MobSF's analysis. This directly undermines MobSF's core purpose as a security analysis tool.

SQL Injection (Confirmed in Isolation)

The SELECT * FROM query on line 557 is demonstrably injectable. When the malicious table name x' UNION SELECT 'SQL_INJECTION_PROOF'-- is interpolated, the resulting query:

```sql

SELECT * FROM 'x' UNION SELECT 'SQL_INJECTION_PROOF'--'

```

Successfully executes and returns attacker-controlled data via UNION SELECT. The -- comments out the trailing single quote. This is verified by the PoC script.

Note: In the current code structure, the `PRAGMA

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is high, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability high.

Weakness class

CVE-2026-33545 is classified as CWE-89: SQL Injection. Untrusted input is concatenated into an SQL statement, letting an attacker change the query and reach data the request should not return.

Affected software

CVE-2026-33545 is recorded against 2 packages.

  • mobile-security-framework (fixed in 4.4.6)
  • mobsf (fixed in 4.4.6)

Timeline and source

Published on 26 March 2026 and last revised on 17 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. A vendor advisory or fix has been published. Record sourced from NVD.

References

github.com
github.com
github.com

Details

Severity MEDIUM
CVSS Score 5.3
CVSS Vector CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
CWE CWE-89
Public Exploit ⚠️ Yes
Source NVD
Published 2026-03-26
Updated 2026-08-12
Modified 2026-06-17

Affected Packages

Software From version Fixed in
mobile-security-framework 4.4.6
mobsf 4.4.6

Similar Threats

Exploit Protection

Are you running mobile-security-framework?

CVE-2026-33545 carries CVSS 5.3 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-33545 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.