CVE-2025-7156
Awaiting Analysis Awaiting Analysis - Queue
BaseFortify

Publication date: 2025-07-08

Last updated on: 2026-04-29

Assigner: VulDB

Description
A vulnerability has been found in hitsz-ids airda 0.0.3 and classified as critical. This vulnerability affects the function execute of the file /v1/chat/completions. The manipulation of the argument question leads to sql injection. The attack can be initiated remotely. The exploit has been disclosed to the public and may be used.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-07-08
Last Modified
2026-04-29
Generated
2026-05-07
AI Q&A
2025-07-08
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Currently, no data is known.
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-74 The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
CWE-89 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.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a SQL Injection issue in hitsz-ids airda version 0.0.3, specifically in the /v1/chat/completions endpoint's execute function. It arises because user input provided via the 'question' parameter is directly incorporated into a prompt sent to a Large Language Model (LLM), which generates SQL queries based on this input. The generated SQL is then executed by the application without proper validation or sanitization. An attacker can exploit this by injecting malicious instructions into the 'question' parameter, causing the LLM to produce harmful SQL commands such as deleting data, modifying data, or unauthorized data retrieval. This type of attack is known as Prompt-to-SQL Injection (P2SQL Injection), a variant of SQL Injection. [1, 2, 3]


How can this vulnerability impact me? :

This vulnerability can lead to unauthorized data access, data modification, data deletion, data corruption, and denial of service. Because the malicious SQL generated by the LLM is executed without sufficient validation, attackers can manipulate the system to delete tables, alter data, or retrieve sensitive information. The impact affects the confidentiality, integrity, and availability of the affected system, potentially causing significant damage to data and system operations. [1, 2, 3]


How can this vulnerability be detected on my network or system? Can you suggest some commands?

Detection can focus on monitoring and analyzing requests to the /v1/chat/completions endpoint, specifically looking for suspicious or malicious inputs in the 'question' parameter that could lead to SQL injection. Network or application logs should be inspected for unusual SQL commands generated by the LLM, such as DROP, DELETE, or ALTER statements. Since the vulnerability involves SQL injection via crafted inputs, commands to detect SQL injection attempts or anomalous SQL queries could be used. For example, monitoring HTTP requests with tools like curl or using web application firewalls (WAF) to detect SQL injection patterns. Specific commands might include capturing traffic with tcpdump or Wireshark filtering for POST requests to /v1/chat/completions, or using grep to search logs for keywords like 'DROP TABLE', 'DELETE FROM', or other SQL modification commands. However, no explicit detection commands are provided in the resources. [1, 2, 3]


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include: 1) Implement strict validation and syntactic parsing of the SQL generated by the LLM to block dangerous operations such as DROP, DELETE without WHERE clauses, and ALTER. 2) Apply a whitelisting mechanism to restrict SQL statements to safe types like SELECT and limit access to specific tables and columns. 3) Modify the prompt engineering to instruct the LLM to generate only safe, non-modifying SQL queries and reject requests involving data modification or deletion. 4) Configure the database user with the principle of least privilege to minimize the impact of any malicious SQL execution. Additionally, since no known countermeasures exist for this specific product version, consider replacing the affected product with an alternative. These steps help reduce the risk of exploitation until a patch or update is available. [2, 3]


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart