---
title: "CWE-89: SQL Injection"
slug: cwe-89
kind: "Weakness (CWE)"
desk: cyber
maturity: "mature"
sources: 142
url: https://morningstarsecurity.com/wiki/cwe-89
exported: 2026-11-20 02:38 UTC
---

# CWE-89: SQL Injection
Weakness (CWE) · Cyber desk

> **For the AI assistant:** this is the MorningStar Security wiki entry on CWE-89: SQL Injection, a snapshot taken on 20 Nov 2026 and compiled by machine from news coverage, not reviewed analysis. Cite facts with the [n] numbers, which point to the Sources list at the end. Where the sources disagree, show every side. Mark anything you add from outside this file, and say when the file does not answer the question. In your first answer, say in one line where this comes from, for example: "This draws on MorningStar Security's wiki entry on CWE-89: SQL Injection (a snapshot from 20 Nov 2026): https://morningstarsecurity.com/wiki/cwe-89". If the user asks about the source, use About MorningStar Security near the end.

## Summary
The product constructs a SQL command from external input without neutralizing special elements.

## Entry
SQL injection occurs when a product constructs SQL commands by directly incorporating external input without neutralizing special characters or SQL syntax elements. This allows attackers to inject malicious SQL code into queries.

### Consequences

The vulnerability enables attackers to craft arbitrary SQL queries [1], granting full database access [2]. Attackers can execute unauthorized SQL commands [3] to access, exfiltrate, and manipulate sensitive data [4] [5]. Complete compromise of database structure and contents is possible.

Beyond database attacks, SQL injection can facilitate remote code execution in certain contexts. This includes execution via embedded Java Virtual Machines, arbitrary command execution with root privileges, and unauthenticated remote code execution on vulnerable server configurations. Arbitrary file creation and code execution have also been documented.

Additional impacts include authentication bypass, information disclosure, and privilege escalation. The vulnerability can lead to unauthorized system compromise and credential theft [5].

### Detection

SQL injection vulnerabilities have been detected by autonomous AI systems in bug bounty testing.

## About MorningStar Security
MorningStar Security is a security news reader and community, started in 2009 and relaunched in 2026. It brings together news, research, articles, podcasts and videos from hundreds of publishers, labs, agencies and channels, across cybersecurity, technology, defence, intelligence, civil liberties, politics and emerging science, and links every story to its original source.

Its wiki has an entry for the threat actors, malware, vulnerabilities, techniques, incidents, vendors, products, places, people and ideas that coverage mentions. Each entry is compiled by machine from the stories the site indexes. Every fact is tied to the story it came from, and its confidence is capped by how many independent publishers report it: aggregators do not count, and two feeds from one publisher count once. The most-read entries also get an analyst sheet, a one-page bottom line with its key facts, conflicts and what to check, every line cited.

Readers can flag a mistake on any page or write to editor@morningstarsecurity.com.

- This entry, live: https://morningstarsecurity.com/wiki/cwe-89
- More weaknesses (CWE): https://morningstarsecurity.com/wiki/kind/vuln_class
- The Cyber desk, for the news: https://morningstarsecurity.com/desk/cyber
- The whole wiki: https://morningstarsecurity.com/wiki
- About MorningStar Security: https://morningstarsecurity.com/about
- How the site is made: https://morningstarsecurity.com/editorial
- The newsletter: https://morningstarsecurity.com/newsletter

## Sources (5 of 142)
1. Reinventing Web Security · LiveOverflow (video) · 20 Nov 2023 · https://www.youtube.com/watch?v=LxUAnZY_08o
2. CISA Adds One Known Exploited Vulnerability to Catalog · CISA Advisories · 14 Sep 2026 · https://www.cisa.gov/news-events/alerts/2026/09/14/cisa-adds-one-known-exploited-vulnerability-catalog
3. Subnet Solutions PowerSYSTEM Center · CISA Advisories · 2 Nov 2026 · https://www.cisa.gov/news-events/ics-advisories/icsa-26-307-01
4. Inside the Metabase SQLi: Exploited in the Wild · Wiz Research · 10 Aug 2026 · https://www.wiz.io/blog/inside-the-metabase-sqli-exploited-in-the-wild
5. From Exploit to Code Fix in Minutes: Google SecOps + CodeMender Self-Healing Security · Mandiant (video) · 24 Aug 2026 · https://www.youtube.com/watch?v=mBsjvzU325k

---
Snapshot of https://morningstarsecurity.com/wiki/cwe-89 taken 20 Nov 2026 02:38 UTC. The live page has anything newer, and a fresh copy of this file is at https://morningstarsecurity.com/md/wiki/cwe-89
