Common Weakness Enumeration

CWE-89

Allowed

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Abstraction: Base · Status: Stable

The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.

27602 vulnerabilities reference this CWE, most recent first.

GHSA-HQHR-2WM6-H7FV

Vulnerability from github – Published: 2025-01-16 18:31 – Updated: 2025-01-22 18:31
VLAI
Details

JFinalOA before v2025.01.01 was discovered to contain a SQL injection vulnerability via the component borrowmoney/listData?applyUser.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-57769"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2025-01-16T18:15:26Z",
    "severity": "HIGH"
  },
  "details": "JFinalOA before v2025.01.01 was discovered to contain a SQL injection vulnerability via the component borrowmoney/listData?applyUser.",
  "id": "GHSA-hqhr-2wm6-h7fv",
  "modified": "2025-01-22T18:31:54Z",
  "published": "2025-01-16T18:31:00Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-57769"
    },
    {
      "type": "WEB",
      "url": "https://gitee.com/r1bbit/JFinalOA/issues/IBHUNR"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-HQJ5-W7WQ-79FV

Vulnerability from github – Published: 2022-12-28 21:30 – Updated: 2023-01-06 21:30
VLAI
Details

A vulnerability was found in challenge website. It has been rated as critical. This issue affects some unknown processing. The manipulation leads to sql injection. The name of the patch is f1644b1d3502e5aa5284f31ea80d2623817f4d42. It is recommended to apply a patch to fix this issue. The identifier VDB-216989 was assigned to this vulnerability.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2017-20150"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2022-12-28T19:15:00Z",
    "severity": "HIGH"
  },
  "details": "A vulnerability was found in challenge website. It has been rated as critical. This issue affects some unknown processing. The manipulation leads to sql injection. The name of the patch is f1644b1d3502e5aa5284f31ea80d2623817f4d42. It is recommended to apply a patch to fix this issue. The identifier VDB-216989 was assigned to this vulnerability.",
  "id": "GHSA-hqj5-w7wq-79fv",
  "modified": "2023-01-06T21:30:42Z",
  "published": "2022-12-28T21:30:22Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2017-20150"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Challenge/website/commit/f1644b1d3502e5aa5284f31ea80d2623817f4d42"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?ctiid.216989"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?id.216989"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-HQJ8-FXPV-8QR3

Vulnerability from github – Published: 2022-05-01 23:44 – Updated: 2022-05-01 23:44
VLAI
Details

SQL injection vulnerability in links.php in Scriptsagent.com Links Directory 1.1 allows remote authenticated users to execute arbitrary SQL commands via the cat_id parameter in a list action.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-1871"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2008-04-17T19:05:00Z",
    "severity": "MODERATE"
  },
  "details": "SQL injection vulnerability in links.php in Scriptsagent.com Links Directory 1.1 allows remote authenticated users to execute arbitrary SQL commands via the cat_id parameter in a list action.",
  "id": "GHSA-hqj8-fxpv-8qr3",
  "modified": "2022-05-01T23:44:26Z",
  "published": "2022-05-01T23:44:26Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-1871"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/41661"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/5377"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/29710"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/28655"
    },
    {
      "type": "WEB",
      "url": "http://www.vupen.com/english/advisories/2008/1126/references"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-HQJR-43R5-9Q58

Vulnerability from github – Published: 2026-03-24 19:23 – Updated: 2026-03-27 21:17
VLAI
Summary
MobSF has SQL Injection in its SQLite Database Viewer Utils
Details

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:

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):
  2. Triggered when an analyst clicks to view a .db file in device data
  3. Applies to both Android and iOS dynamic analysis

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

  5. 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:
  7. PRAGMA table_info('x' UNION SELECT 'SQL_INJECTION_PROOF'--') -- causes syntax error (DoS)
  8. 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:

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 table_info() statement on line 553 runs before the SELECT * FROM on line 557. The PRAGMA fails with a syntax error for injected payloads, which triggers the exception handler before the SELECT can execute. This limits the full exploitation chain. However, the code flaw is real and any future refactoring that changes the execution order or removes the PRAGMA would immediately expose the full SQL injection.

Proof of Concept

Files Provided(Gdrive)

File Description
poc_sqlite_injection.py Standalone PoC demonstrating the vulnerability
malicious.db Crafted SQLite database (generated by PoC)
create_malicious_apk.sh Script to package the malicious DB into an APK
malicious_sqli.apk Pre-built APK for testing against MobSF

https://drive.google.com/drive/folders/1mNGkFfNowkaZ5J018HFi4IQcnjKaWCym?usp=sharing

Running the PoC

# Run the standalone PoC (no MobSF required)
python3 poc_sqlite_injection.py

# Build the malicious APK (requires Android SDK)
./create_malicious_apk.sh

# Test against MobSF
# 1. Start MobSF
# 2. Upload malicious_sqli.apk
# 3. Browse extracted files -> click app_data.db
# 4. Observe: database viewer fails (DoS)

PoC Output (Abbreviated)

[STEP 2] Running MobSF's read_sqlite() against malicious database...
    [!] EXCEPTION CAUGHT: OperationalError: near "UNION": syntax error
    [!] DoS CONFIRMED: read_sqlite() crashed

[STEP 3] Demonstrating SELECT * FROM injection in isolation...
    Query: SELECT * FROM 'x' UNION SELECT 'SQL_INJECTION_PROOF'--'
    [+] Query executed successfully!
    [+] Results: [('SQL_INJECTION_PROOF',), ('normal_data',)]
    [+] SQL INJECTION CONFIRMED

[STEP 4] Complete DoS (malicious table created first):
    Tables with data: NONE
    [!] COMPLETE DoS CONFIRMED

Suggested Fix

Replace string formatting with properly quoted identifiers. SQLite uses double quotes for identifiers:

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_name = table[0]
            # Properly escape table name as a double-quoted identifier
            safe_name = table_name.replace('"', '""')
            table_dict[table_name] = {'head': [], 'data': []}
            cur.execute(f'PRAGMA table_info("{safe_name}")')
            rows = cur.fetchall()
            for sq_row in rows:
                table_dict[table_name]['head'].append(sq_row[1])
            cur.execute(f'SELECT * FROM "{safe_name}"')
            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_name]['data'].append(tmp_row)
    except Exception:
        logger.exception('Reading SQLite db')
    return table_dict

This escapes any double quotes within table names by doubling them ("""), which is the standard SQL mechanism for identifier quoting. This prevents breakout from the double-quoted identifier context.

Resources

  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
  • OWASP SQL Injection: https://owasp.org/www-community/attacks/SQL_Injection
  • Affected File: mobsf/MobSF/utils.py, lines 542-566
Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 4.4.5"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "mobsf"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "4.4.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-33545"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-24T19:23:52Z",
    "nvd_published_at": "2026-03-26T21:17:06Z",
    "severity": "MODERATE"
  },
  "details": "## Description\n\nMobSF\u0027s `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\u0027s `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.\n\nThis allows an attacker to:\n\n1. **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\u0027s analysis.\n\n2. **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.\n\n## Root Cause\n\nThe vulnerable code in `mobsf/MobSF/utils.py:542-566`:\n\n```python\ndef read_sqlite(sqlite_file):\n    \"\"\"Sqlite Dump - Readable Text.\"\"\"\n    table_dict = {}\n    try:\n        con = sqlite3.connect(sqlite_file)\n        cur = con.cursor()\n        cur.execute(\u0027SELECT name FROM sqlite_master WHERE type=\\\u0027table\\\u0027;\u0027)\n        tables = cur.fetchall()\n        for table in tables:\n            table_dict[table[0]] = {\u0027head\u0027: [], \u0027data\u0027: []}\n            cur.execute(\u0027PRAGMA table_info(\\\u0027%s\\\u0027)\u0027 % table)    # \u003c-- INJECTION POINT 1\n            rows = cur.fetchall()\n            for sq_row in rows:\n                table_dict[table[0]][\u0027head\u0027].append(sq_row[1])\n            cur.execute(\u0027SELECT * FROM \\\u0027%s\\\u0027\u0027 % table)         # \u003c-- INJECTION POINT 2\n            rows = cur.fetchall()\n            for sq_row in rows:\n                tmp_row = []\n                for each_row in sq_row:\n                    tmp_row.append(str(each_row))\n                table_dict[table[0]][\u0027data\u0027].append(tmp_row)\n    except Exception:\n        logger.exception(\u0027Reading SQLite db\u0027)\n    return table_dict\n```\n\n**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.\n\n## Attack Vector\n\nThe `read_sqlite()` function is called from two locations:\n\n1. **Dynamic Analysis File Viewer** (`mobsf/DynamicAnalyzer/views/common/device.py:64`):\n   - Triggered when an analyst clicks to view a `.db` file in device data\n   - Applies to both Android and iOS dynamic analysis\n\n2. **iOS Static Analysis File Viewer** (`mobsf/StaticAnalyzer/views/ios/views/view_source.py:123`):\n   - Triggered when an analyst clicks to view a `.db` file during iOS static analysis\n\n### Attack Scenario\n\n1. Attacker creates a malicious Android APK (or iOS IPA) containing a SQLite database with a crafted table name in the `assets/` directory\n2. The SQLite database contains a table created with:\n   ```sql\n   CREATE TABLE \"x\u0027 UNION SELECT \u0027SQL_INJECTION_PROOF\u0027--\" (id INTEGER);\n   ```\n3. Security analyst uploads the application to MobSF for analysis\n4. Analyst browses the extracted files and clicks to view the SQLite database\n5. MobSF\u0027s `read_sqlite()` reads table names from `sqlite_master`, including the malicious name `x\u0027 UNION SELECT \u0027SQL_INJECTION_PROOF\u0027--`\n6. The table name is interpolated into SQL queries via string formatting:\n   - `PRAGMA table_info(\u0027x\u0027 UNION SELECT \u0027SQL_INJECTION_PROOF\u0027--\u0027)` -- causes syntax error (DoS)\n   - `SELECT * FROM \u0027x\u0027 UNION SELECT \u0027SQL_INJECTION_PROOF\u0027--\u0027` -- SQL injection (UNION SELECT returns attacker data)\n\n## Impact\n\n### Denial of Service (Confirmed)\n\nWhen 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.\n\n**Security impact:** A malicious app author can use this technique to **hide incriminating data** stored in SQLite databases from MobSF\u0027s analysis. This directly undermines MobSF\u0027s core purpose as a security analysis tool.\n\n### SQL Injection (Confirmed in Isolation)\n\nThe `SELECT * FROM` query on line 557 is demonstrably injectable. When the malicious table name `x\u0027 UNION SELECT \u0027SQL_INJECTION_PROOF\u0027--` is interpolated, the resulting query:\n\n```sql\nSELECT * FROM \u0027x\u0027 UNION SELECT \u0027SQL_INJECTION_PROOF\u0027--\u0027\n```\n\nSuccessfully executes and returns attacker-controlled data via `UNION SELECT`. The `--` comments out the trailing single quote. This is verified by the PoC script.\n\n**Note:** In the current code structure, the `PRAGMA table_info()` statement on line 553 runs before the `SELECT * FROM` on line 557. The PRAGMA fails with a syntax error for injected payloads, which triggers the exception handler before the SELECT can execute. This limits the full exploitation chain. However, the code flaw is real and any future refactoring that changes the execution order or removes the PRAGMA would immediately expose the full SQL injection.\n\n## Proof of Concept\n\n### Files Provided(Gdrive)\n\n| File | Description |\n|------|-------------|\n| `poc_sqlite_injection.py` | Standalone PoC demonstrating the vulnerability |\n| `malicious.db` | Crafted SQLite database (generated by PoC) |\n| `create_malicious_apk.sh` | Script to package the malicious DB into an APK |\n| `malicious_sqli.apk` | Pre-built APK for testing against MobSF |\n\nhttps://drive.google.com/drive/folders/1mNGkFfNowkaZ5J018HFi4IQcnjKaWCym?usp=sharing\n\n\n### Running the PoC\n\n```bash\n# Run the standalone PoC (no MobSF required)\npython3 poc_sqlite_injection.py\n\n# Build the malicious APK (requires Android SDK)\n./create_malicious_apk.sh\n\n# Test against MobSF\n# 1. Start MobSF\n# 2. Upload malicious_sqli.apk\n# 3. Browse extracted files -\u003e click app_data.db\n# 4. Observe: database viewer fails (DoS)\n```\n\n### PoC Output (Abbreviated)\n\n```\n[STEP 2] Running MobSF\u0027s read_sqlite() against malicious database...\n    [!] EXCEPTION CAUGHT: OperationalError: near \"UNION\": syntax error\n    [!] DoS CONFIRMED: read_sqlite() crashed\n\n[STEP 3] Demonstrating SELECT * FROM injection in isolation...\n    Query: SELECT * FROM \u0027x\u0027 UNION SELECT \u0027SQL_INJECTION_PROOF\u0027--\u0027\n    [+] Query executed successfully!\n    [+] Results: [(\u0027SQL_INJECTION_PROOF\u0027,), (\u0027normal_data\u0027,)]\n    [+] SQL INJECTION CONFIRMED\n\n[STEP 4] Complete DoS (malicious table created first):\n    Tables with data: NONE\n    [!] COMPLETE DoS CONFIRMED\n```\n\n## Suggested Fix\n\nReplace string formatting with properly quoted identifiers. SQLite uses double quotes for identifiers:\n\n```python\ndef read_sqlite(sqlite_file):\n    \"\"\"Sqlite Dump - Readable Text.\"\"\"\n    table_dict = {}\n    try:\n        con = sqlite3.connect(sqlite_file)\n        cur = con.cursor()\n        cur.execute(\u0027SELECT name FROM sqlite_master WHERE type=\\\u0027table\\\u0027;\u0027)\n        tables = cur.fetchall()\n        for table in tables:\n            table_name = table[0]\n            # Properly escape table name as a double-quoted identifier\n            safe_name = table_name.replace(\u0027\"\u0027, \u0027\"\"\u0027)\n            table_dict[table_name] = {\u0027head\u0027: [], \u0027data\u0027: []}\n            cur.execute(f\u0027PRAGMA table_info(\"{safe_name}\")\u0027)\n            rows = cur.fetchall()\n            for sq_row in rows:\n                table_dict[table_name][\u0027head\u0027].append(sq_row[1])\n            cur.execute(f\u0027SELECT * FROM \"{safe_name}\"\u0027)\n            rows = cur.fetchall()\n            for sq_row in rows:\n                tmp_row = []\n                for each_row in sq_row:\n                    tmp_row.append(str(each_row))\n                table_dict[table_name][\u0027data\u0027].append(tmp_row)\n    except Exception:\n        logger.exception(\u0027Reading SQLite db\u0027)\n    return table_dict\n```\n\nThis escapes any double quotes within table names by doubling them (`\"` \u2192 `\"\"`), which is the standard SQL mechanism for identifier quoting. This prevents breakout from the double-quoted identifier context.\n\n## Resources\n\n- **CWE-89**: Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)\n- **OWASP SQL Injection**: https://owasp.org/www-community/attacks/SQL_Injection\n- **Affected File**: `mobsf/MobSF/utils.py`, lines 542-566",
  "id": "GHSA-hqjr-43r5-9q58",
  "modified": "2026-03-27T21:17:40Z",
  "published": "2026-03-24T19:23:52Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/MobSF/Mobile-Security-Framework-MobSF/security/advisories/GHSA-hqjr-43r5-9q58"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33545"
    },
    {
      "type": "WEB",
      "url": "https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/6f8a43c1b78d21cfbd7186aaafa7f622d990e0f1"
    },
    {
      "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.4.6"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "MobSF has SQL Injection in its SQLite Database Viewer Utils"
}

GHSA-HQM2-GWQF-R5G5

Vulnerability from github – Published: 2021-09-02 17:17 – Updated: 2021-08-30 17:26
VLAI
Summary
SQL injection in TYPO3 extension
Details

It has been discovered that the extension is susceptible to SQL Injection when processing bounced emails.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "ecodev/newsletter"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "last_affected": "4.0.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2021-38302"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2021-08-30T17:26:36Z",
    "nvd_published_at": "2021-08-13T17:15:00Z",
    "severity": "CRITICAL"
  },
  "details": "It has been discovered that the extension is susceptible to SQL Injection when processing bounced emails.",
  "id": "GHSA-hqm2-gwqf-r5g5",
  "modified": "2021-08-30T17:26:36Z",
  "published": "2021-09-02T17:17:06Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-38302"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/Ecodev/newsletter"
    },
    {
      "type": "WEB",
      "url": "https://typo3.org/security/advisory/typo3-ext-sa-2021-014"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N/E:F/RL:U/RC:C",
      "type": "CVSS_V3"
    }
  ],
  "summary": "SQL injection in TYPO3 extension"
}

GHSA-HQM3-MJ3R-89FX

Vulnerability from github – Published: 2022-05-17 05:36 – Updated: 2022-05-17 05:36
VLAI
Details

SQL injection vulnerability in view_photo.php in 2daybiz Online Classified Script allows remote attackers to execute arbitrary SQL commands via the alb parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2010-5019"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2011-11-02T21:55:00Z",
    "severity": "HIGH"
  },
  "details": "SQL injection vulnerability in view_photo.php in 2daybiz Online Classified Script allows remote attackers to execute arbitrary SQL commands via the alb parameter.",
  "id": "GHSA-hqm3-mj3r-89fx",
  "modified": "2022-05-17T05:36:51Z",
  "published": "2022-05-17T05:36:51Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2010-5019"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.org/1006-exploits/2daybizocs-sqlxss.txt"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/40213"
    },
    {
      "type": "WEB",
      "url": "http://www.exploit-db.com/exploits/13894"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/40890"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-HQM3-MX3R-HFQ5

Vulnerability from github – Published: 2022-05-01 23:52 – Updated: 2022-05-01 23:52
VLAI
Details

Multiple SQL injection vulnerabilities in the EXP JoomRadio (com_joomradio) component 1.0 for Joomla! allow remote attackers to execute arbitrary SQL commands via the id parameter in a (1) show_radio or (2) show_video action to index.php.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2008-2633"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2008-06-10T00:32:00Z",
    "severity": "HIGH"
  },
  "details": "Multiple SQL injection vulnerabilities in the EXP JoomRadio (com_joomradio) component 1.0 for Joomla! allow remote attackers to execute arbitrary SQL commands via the id parameter in a (1) show_radio or (2) show_video action to index.php.",
  "id": "GHSA-hqm3-mx3r-hfq5",
  "modified": "2022-05-01T23:52:03Z",
  "published": "2022-05-01T23:52:03Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2008-2633"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42814"
    },
    {
      "type": "WEB",
      "url": "https://www.exploit-db.com/exploits/5729"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.org/0806-exploits/joomlajoomradio-sql.txt"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/30513"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/501069/100/0/threaded"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/29504"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-HQM7-387P-82RC

Vulnerability from github – Published: 2022-05-02 03:15 – Updated: 2022-05-02 03:15
VLAI
Details

SQL injection vulnerability in browsecats.php in E-Php CMS allows remote attackers to execute arbitrary SQL commands via the cid parameter.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2009-0401"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2009-02-03T19:30:00Z",
    "severity": "HIGH"
  },
  "details": "SQL injection vulnerability in browsecats.php in E-Php CMS allows remote attackers to execute arbitrary SQL commands via the cid parameter.",
  "id": "GHSA-hqm7-387p-82rc",
  "modified": "2022-05-02T03:15:16Z",
  "published": "2022-05-02T03:15:16Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2009-0401"
    },
    {
      "type": "WEB",
      "url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/48297"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.org/0901-exploits/ephpcmscid-sql.txt"
    },
    {
      "type": "WEB",
      "url": "http://secunia.com/advisories/31923"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/33470"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-HQMQ-GF3P-RVF7

Vulnerability from github – Published: 2022-05-14 02:48 – Updated: 2022-05-14 02:48
VLAI
Details

Multiple SQL injection vulnerabilities in SysAid Help Desk before 15.2 allow remote administrators to execute arbitrary SQL commands via the (1) groupFilter parameter in an AssetDetails report to /genericreport, customSQL parameter in a (2) TopAdministratorsByAverageTimer report or an (3) ActiveRequests report to /genericreport, (4) dir parameter to HelpDesk.jsp, or (5) grantSQL parameter to RFCGantt.jsp.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2015-2999"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2015-06-08T14:59:00Z",
    "severity": "MODERATE"
  },
  "details": "Multiple SQL injection vulnerabilities in SysAid Help Desk before 15.2 allow remote administrators to execute arbitrary SQL commands via the (1) groupFilter parameter in an AssetDetails report to /genericreport, customSQL parameter in a (2) TopAdministratorsByAverageTimer report or an (3) ActiveRequests report to /genericreport, (4) dir parameter to HelpDesk.jsp, or (5) grantSQL parameter to RFCGantt.jsp.",
  "id": "GHSA-hqmq-gf3p-rvf7",
  "modified": "2022-05-14T02:48:55Z",
  "published": "2022-05-14T02:48:55Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2015-2999"
    },
    {
      "type": "WEB",
      "url": "https://www.sysaid.com/blog/entry/sysaid-15-2-your-voice-your-service-desk"
    },
    {
      "type": "WEB",
      "url": "http://packetstormsecurity.com/files/132138/SysAid-Help-Desk-14.4-Code-Execution-Denial-Of-Service-Traversal-SQL-Injection.html"
    },
    {
      "type": "WEB",
      "url": "http://seclists.org/fulldisclosure/2015/Jun/8"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/archive/1/535679/100/0/threaded"
    },
    {
      "type": "WEB",
      "url": "http://www.securityfocus.com/bid/75038"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}

GHSA-HQMX-F23F-P7XQ

Vulnerability from github – Published: 2024-02-27 18:31 – Updated: 2024-02-27 18:31
VLAI
Details

A vulnerability was found in CodeAstro Membership Management System 1.0. It has been classified as critical. This affects an unknown part of the file /get_membership_amount.php. The manipulation of the argument membershipTypeId leads to sql injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The associated identifier of this vulnerability is VDB-254859.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2024-1924"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-89"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-02-27T17:15:11Z",
    "severity": "MODERATE"
  },
  "details": "A vulnerability was found in CodeAstro Membership Management System 1.0. It has been classified as critical. This affects an unknown part of the file /get_membership_amount.php. The manipulation of the argument membershipTypeId leads to sql injection. It is possible to initiate the attack remotely. The exploit has been disclosed to the public and may be used. The associated identifier of this vulnerability is VDB-254859.",
  "id": "GHSA-hqmx-f23f-p7xq",
  "modified": "2024-02-27T18:31:02Z",
  "published": "2024-02-27T18:31:02Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-1924"
    },
    {
      "type": "WEB",
      "url": "https://github.com/1testnew/CVE_Hunter/blob/main/SQLi-1.md"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?ctiid.254859"
    },
    {
      "type": "WEB",
      "url": "https://vuldb.com/?id.254859"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
      "type": "CVSS_V3"
    }
  ]
}

Mitigation MIT-4
Architecture and Design

Strategy: Libraries or Frameworks

  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
  • For example, consider using persistence layers such as Hibernate or Enterprise Java Beans, which can provide significant protection against SQL injection if used properly.
Mitigation MIT-27
Architecture and Design

Strategy: Parameterization

  • If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.
  • Process SQL queries using prepared statements, parameterized queries, or stored procedures. These features should accept parameters or variables and support strong typing. Do not dynamically construct and execute query strings within these features using "exec" or similar functionality, since this may re-introduce the possibility of SQL injection. [REF-867]
Mitigation MIT-17
Architecture and Design Operation

Strategy: Environment Hardening

  • Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
  • Specifically, follow the principle of least privilege when creating user accounts to a SQL database. The database users should only have the minimum privileges necessary to use their account. If the requirements of the system indicate that a user can read and modify their own data, then limit their privileges so they cannot read/write others' data. Use the strictest permissions possible on all database objects, such as execute-only for stored procedures.
Mitigation MIT-15
Architecture and Design

For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Mitigation MIT-28
Implementation

Strategy: Output Encoding

  • While it is risky to use dynamically-generated query strings, code, or commands that mix control and data together, sometimes it may be unavoidable. Properly quote arguments and escape any special characters within those arguments. The most conservative approach is to escape or filter all characters that do not pass an extremely strict allowlist (such as everything that is not alphanumeric or white space). If some special characters are still needed, such as white space, wrap each argument in quotes after the escaping/filtering step. Be careful of argument injection (CWE-88).
  • Instead of building a new implementation, such features may be available in the database or programming language. For example, the Oracle DBMS_ASSERT package can check or enforce that parameters have certain properties that make them less vulnerable to SQL injection. For MySQL, the mysql_real_escape_string() API function is available in both C and PHP.
Mitigation MIT-5
Implementation

Strategy: Input Validation

  • Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • When constructing SQL query strings, use stringent allowlists that limit the character set based on the expected value of the parameter in the request. This will indirectly limit the scope of an attack, but this technique is less important than proper output encoding and escaping.
  • Note that proper output encoding, escaping, and quoting is the most effective solution for preventing SQL injection, although input validation may provide some defense-in-depth. This is because it effectively limits what will appear in output. Input validation will not always prevent SQL injection, especially if you are required to support free-form text fields that could contain arbitrary characters. For example, the name "O'Reilly" would likely pass the validation step, since it is a common last name in the English language. However, it cannot be directly inserted into the database because it contains the "'" apostrophe character, which would need to be escaped or otherwise handled. In this case, stripping the apostrophe might reduce the risk of SQL injection, but it would produce incorrect behavior because the wrong name would be recorded.
  • When feasible, it may be safest to disallow meta-characters entirely, instead of escaping them. This will provide some defense in depth. After the data is entered into the database, later processes may neglect to escape meta-characters before use, and you may not have control over those processes.
Mitigation MIT-21
Architecture and Design

Strategy: Enforcement by Conversion

When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.

Mitigation MIT-39
Implementation
  • Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
  • If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
  • Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
  • In the context of SQL Injection, error messages revealing the structure of a SQL query can help attackers tailor successful attack strings.
Mitigation MIT-29
Operation

Strategy: Firewall

Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481.

Mitigation MIT-16
Operation Implementation

Strategy: Environment Hardening

When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.

CAPEC-108: Command Line Execution through SQL Injection

An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

CAPEC-109: Object Relational Mapping Injection

An attacker leverages a weakness present in the database access layer code generated with an Object Relational Mapping (ORM) tool or a weakness in the way that a developer used a persistence framework to inject their own SQL commands to be executed against the underlying database. The attack here is similar to plain SQL injection, except that the application does not use JDBC to directly talk to the database, but instead it uses a data access layer generated by an ORM tool or framework (e.g. Hibernate). While most of the time code generated by an ORM tool contains safe access methods that are immune to SQL injection, sometimes either due to some weakness in the generated code or due to the fact that the developer failed to use the generated access methods properly, SQL injection is still possible.

CAPEC-110: SQL Injection through SOAP Parameter Tampering

An attacker modifies the parameters of the SOAP message that is sent from the service consumer to the service provider to initiate a SQL injection attack. On the service provider side, the SOAP message is parsed and parameters are not properly validated before being used to access a database in a way that does not use parameter binding, thus enabling the attacker to control the structure of the executed SQL query. This pattern describes a SQL injection attack with the delivery mechanism being a SOAP message.

CAPEC-470: Expanding Control over the Operating System from the Database

An attacker is able to leverage access gained to the database to read / write data to the file system, compromise the operating system, create a tunnel for accessing the host machine, and use this access to potentially attack other machines on the same network as the database machine. Traditionally SQL injections attacks are viewed as a way to gain unauthorized read access to the data stored in the database, modify the data in the database, delete the data, etc. However, almost every data base management system (DBMS) system includes facilities that if compromised allow an attacker complete access to the file system, operating system, and full access to the host running the database. The attacker can then use this privileged access to launch subsequent attacks. These facilities include dropping into a command shell, creating user defined functions that can call system level libraries present on the host machine, stored procedures, etc.

CAPEC-66: SQL Injection

This attack exploits target software that constructs SQL statements based on user input. An attacker crafts input strings so that when the target software constructs SQL statements based on the input, the resulting SQL statement performs actions other than those the application intended. SQL Injection results from failure of the application to appropriately validate input.

CAPEC-7: Blind SQL Injection

Blind SQL Injection results from an insufficient mitigation for SQL Injection. Although suppressing database error messages are considered best practice, the suppression alone is not sufficient to prevent SQL Injection. Blind SQL Injection is a form of SQL Injection that overcomes the lack of error messages. Without the error messages that facilitate SQL Injection, the adversary constructs input strings that probe the target through simple Boolean SQL expressions. The adversary can determine if the syntax and structure of the injection was successful based on whether the query was executed or not. Applied iteratively, the adversary determines how and where the target is vulnerable to SQL Injection.