3,818 questions
0
votes
3
answers
182
views
How to update multiple records with different values and SQL injection protection with raw SQL in prisma?
For November 2025, the Prisma does not support the updating of multiple records with different values. Although the transactions are being considered as main workaround for such cases, the transaction ...
1
vote
2
answers
108
views
Sql injection protection when sending json as a sql function parameter
I am sending a json array with filter parameters from ExtJs in the sql function parameter.
filters look like this:
[{"field":"product_type_id","data":{"type":&...
1
vote
2
answers
159
views
SQL unquoted identifier validation
I'm working on a .NET application that needs to execute SQL parameterized by database objects like tables or columns. The application supports both the Microsoft SQL Server and Oracle ADO.NET ...
1
vote
1
answer
126
views
Creating Postgres Users and Granting Permissions from Go
I'm trying to create database users in my Postgres database from Golang, and I can't seem to get queries to run.
I'm able to establish a connection, but I cannot run create user X with password Y and ...
2
votes
2
answers
171
views
Entity Framework Core is using literal values instead of parameters. Do I need to worry for SQL injection
I have an extension for Entity Framework Core query to support between and I see that the SQL being parsed includes literal values. Is it vulnerable for SQL injection attacks?
This is the extension ...
0
votes
1
answer
115
views
Web Application Firewall (NGINX ModSecurity) - wrong SQL Injection Attack Detection
Our company site is behind WAF based on NGINX ModSecurity. And permanently in WAF logs we see blocked requests from site forms.
Example:
SQL Injection Attack Detected via libinjection - Matched Data: ...
-1
votes
1
answer
168
views
Improper neutralization of special elements used in an SQL Command ('SQL Injection')
I am working on a project and want to delete the table by passing the table_name which is coming from an API request. I want to bypass SQL Injection warning for delete query.
I am using Python, and ...
-2
votes
1
answer
108
views
Why does psycopg2 still allow SQL injection with dynamically constructed table names [closed]
I'm developing a multi-tenant Python web application where users need to query different database tables based on their client context. The challenge is constructing secure SQL queries when table ...
1
vote
1
answer
87
views
Is COL_LENGTH sufficient for parameter sanitation
I have a stored procedure that we are scanning using some AI tools to look for vulnerabilities. I am doing a dynamic SQL statement with an order by clause and that parameter for that order by I am ...
1
vote
0
answers
83
views
Is this code already SQL injection proof or should I use prepared statements? [duplicate]
I was asked to make this code SQL Injection proof:
<?php
$connection = mysqli_connect("localhost", "root", "password", "users_db");
$query = "SELECT * ...
1
vote
2
answers
116
views
Not able to pass Column names as parameterised in ADD COLUMNS command in databricks-sql connector (needed to resolve SQL Injection Snyk Vulnerability)
I'm developing a web application that interacts with Databricks using the Databricks SQL connector. The application allows users from different teams to add/rename/delete columns of existing tables. ...
1
vote
1
answer
134
views
Psalm does not detect SQL Injection
I'm trying to use Psalm to detect SQL Injections. I have the following code :
$pdo = new PDO("mysql:host=db;dbname=tp;port=3306", "user", "password");;
// VULNERABLE ...
0
votes
0
answers
82
views
Why is this method flagged as vulnerable to SQL Injection in GitLab?
I'm working on a C# application using Npgsql to query a PostgreSQL database. I have the following method that constructs a query dynamically while using parameterized queries to prevent SQL injection:
...
0
votes
0
answers
87
views
Add repeated strings in burp suite intruder
I am working on a CTF.
I need to do a SQL injection into a dummy website. In this website when signing up there is not input clean up of any sorts for the username field, and as a friend confirmed it ...
0
votes
1
answer
308
views
How to Safely Parameterize Table Names in C# to prevent SQL Injection?
I'm using Dapper in my project and I want to pass table name as a dynamic parameter in the query.
This is my code:
var tableName = GetTableNameDynamically<TEntity>();
using (var builder = new ...
0
votes
2
answers
285
views
Entity Framework Core: how safe are expressions from SQL injection? [closed]
I am doing research on ways to prevent SQL injection when using Entity Framework Core ORM. Most blogs and sources cite official Microsoft documentation, that the best way is to sanitize values, use ...
0
votes
1
answer
88
views
C# code getting SQL injection issue raise from fortify SCA tool report
This line of code
using (objCmd = new SqlCommand(SPname1, objConn))
is getting flagged as a SQL injection:
public DataSet GetTableByStoredProc(string strProcName, ArrayList alParams) //copy with ...
0
votes
0
answers
84
views
Prepared query with Jinja and BigQuery
For now, I use python, with sql templating (jinja2) for BigQuery API (not sdk) + fastapi.
The queries are generated from api parameters to sql code. Those queries are sent to BQ.
To prevent sql ...
0
votes
0
answers
111
views
"Blind SQL Injection (Time-Based)" vulnerability in ASP.NET web application
I am working on an ASP.NET web application, and a recent security scan (conducted using SecurityMetrics) flagged a vulnerability related to Blind SQL Injection (Time-Based). Here are the details of ...
-1
votes
1
answer
203
views
VeraCode complains SQL injection when my prepared statement has a dynamic database name
My project needs to access a SQL Server which has hundreds databases in it. All those databases have same tables structure
So I need to query those data like this:
select *
from {0}.dbo.tableA
where ...
0
votes
0
answers
138
views
Register arguments for custom boolean operations in Kotlin Exposed
I'm trying out SQL server's full-text search indexes and more specifically the CONTAINS function for finding out whether a column contains an exact match for a user's full name.
I am using the Kotlin ...
0
votes
2
answers
89
views
Is there a name for SQL Injection when it's done on purpose?
I need to concatenate strings to generate a query to execute, mainly because parameters cannot be used in the places I need to.
For example, FETCH NEXT <n> ROWS clause in DB2 does not accept ...
0
votes
0
answers
207
views
SQL injection may be possible with parameter __ID__
I am performing a scan with ZAP on my Nextjs 14 web application and I am encountering this security issue:
Field
Details
Risk Level
High
Vulnerability
SQL Injection - SQLite
Description
SQL injection ...
0
votes
1
answer
243
views
Struggling with Veracode flagging tableName-variable as "SQL Injection" flaw
We have a command-line utility program that loads the specified file (CSV) into the specified table.
Obviously, the table-name will be externally-provided (on command-line), and Veracode flags that as ...
1
vote
0
answers
79
views
SQLI Blind Injection Conditional Errors Issue
I am taking the course in Portswigger.net for SQLi and am stuck in Lab 12 where I cant seem to get the administrator password. I am using this https://github.com/rkhal101/Web-Security-Academy-Series/...
0
votes
3
answers
96
views
Is it possible to have SQL Injection in Java PreparedStatement without setString() or setInt() methods? [duplicate]
In Java, if a user input is directly appended to an SQL query without using methods like setString() or setInt(), but the query is executed using a PreparedStatement, is it still considered SQL ...
0
votes
1
answer
86
views
Format a SELECT query that avoids SQL injection taking multiple parameters
I'm using Python 3 and SQLAlchemy to create dynamically a query that selects all the products that fulfill the conditions and avoids SQL injection issues.
I get the following error: "List ...
0
votes
0
answers
82
views
SQL injection with LIKE Clause (bWAPP Get/Search Medium Level) [duplicate]
I was trying to perform some SQL Injection on bWAPP application. I a running test on medium level where query is like this.
SELECT * FROM movies WHERE title LIKE '%".$(title)."%';
User will ...
0
votes
0
answers
286
views
SQL Injection query with UNION
I'm walking through some online training and I'm stuck in a place where I have to use SQL injection via a UNION query.
Here's the initial query:
SELECT *
FROM Transactions T
LEFT JOIN Accounts as OA ...
-1
votes
1
answer
80
views
Burp Repeater Request giving client Error: Forbidden in python requests (portswigger labs)
im doing portswigger blind sqli lab: https://portswigger.net/web-security/sql-injection/blind/lab-conditional-responses
in the burp repeater after intecepting requests, it is working fine, as the ...
0
votes
1
answer
861
views
Is ExecuteSqlRawAsync method with parameterized query in ASP .NET Core a proper way of preventing SQL injection attacks?
This is a parametrized query:
string sqlQuery = @"UPDATE MyTable
SET MyTableItemName = @newName
WHERE MyTableItemId = @id;";
await _context....
0
votes
2
answers
765
views
Sql string concatenation is always bad?
At university, we learned, and I also read in many places, that you should NEVER concatenate SQL strings. Yes, I know it's because of SQL injection, and I am aware of that.
However, what if the string ...
0
votes
0
answers
92
views
SQL injection and resulting query of sp_executesql
I've developed a stored procedure that utilizes dynamic SQL to search for specific entities (this is a procedure for catch all logic). Is this procedure prone to SQL injection, and how do I get the ...
0
votes
1
answer
591
views
How to avoid SQL content sent from HTML form being blocked by Cloudflare?
I have a POST form that includes a textarea for SQL content. Cloudflare will occasionally classify the content as a SQL Injection attempt and block the submission.
Is there a safe or proper way to ...
1
vote
0
answers
51
views
How to Enhance Security Against SQL Injection in PHP with PostgreSQL? [duplicate]
I've implemented a PHP script to handle form submissions and insert data into a PostgreSQL database. However, I'm concerned about the potential security vulnerabilities, particularly SQL injection. ...
0
votes
0
answers
63
views
Oracle 19c PL/SQL: Security Scan Finding - SQL Injection [duplicate]
I've done a search here on stackoverflow and read through some posts that are similar regarding PL/SQL SQL injection prevention, but they didn't seem to match my question specifically. This post ...
1
vote
1
answer
564
views
how to prevent sql injection in snowflake filter function
Im using input from the user to query snowflake within DRF view, how to prevent in the below code sql injection possibility?
entity_id = kwargs['pk']
table = session.table("my_table").filter(...
-3
votes
1
answer
870
views
Parametrize table name in SQL query
I have a Python script executing DB2 query as
select count(*) as num_rows from {table}
The value of {table} is read from a list of tables and I need to print out the count corresponding to each table. ...
1
vote
1
answer
173
views
Avoid SQL injection in incoming query coming in in-parameter
I have a procedure which will receive query in in parameter. I'm running the incoming query inside a procedure, and the Checkmarx tool detecting SQL injection in my_cursor.
How do I solve this?
I ...
1
vote
0
answers
279
views
Does Mongoose prevent NoSQL injections?
I know that similar questions about the prevention of NoSQL injections exist.
One example is this answer on the StackOverflow platform:
https://stackoverflow.com/a/63839225/14043571
The answer ...
0
votes
1
answer
109
views
What string can be used in JPQL order by to cause SQL injection?
Consider code similar to this:
String orderBy = getParameter("orderBy");
String orderDir = getOrderDir(); // returns "asc" or "desc"
String query = "select u from ...
1
vote
2
answers
538
views
how to sanitze client query to whereFullText eloquent method in laravel
I'm encountering an issue with whereFullText in Laravel. Here's my code:
$search_key = $args['q'] ?? $args['search_key'] ?? NULL;
$builder->when($search_key, function (Builder $builder, $search_key)...
0
votes
1
answer
218
views
Regular expressions Haproxy
Hi I want to write a regular expression to search SQL Injection.
For example
‘123) ORDER BY 1-- KhUB’)])
‘123) ORDER BY 1435-- SQlQ’)])
‘123) ORDER BY 1-- wIYj’)])
‘123) ORDER BY 3116-- AdZB’)])
‘123))...
0
votes
0
answers
165
views
xp_cmdshell as dbo user only able to run 'ping localhost' to verify RCE?
I am currently doing a pentest on a client's asp web application and I have identified a blind SQL injection. However, after enabling xp_cmdshell, I am only able to run the ping localhost command to ...
0
votes
0
answers
39
views
LARAVEL 9. ERROR LARAVEL: 403 Forbidden You do not have permission to access this document. When writting "----" characters in field [duplicate]
I have developed a website with Laravel 9.X, which works correctly locally, but on my Host, I am having problems with an input, when I try to make an update.
I have some input fields in an edit page, ...
0
votes
1
answer
733
views
Is this SQL/NoSQL/DSL injection in Opensearch python client?
The Opensearch documentation around using the low-level python client is here.
When executing search queries it shows the following example:
# Search for the document.
q = 'miller'
query = {
'size': ...
-1
votes
1
answer
158
views
PHP Code Functioning as Intended but UNION Injection Payload Doesn't Work
I am attempting to make a web application (LAMP stack - MySQL version: 8.0.36-0ubuntu0.22.04.1) that is vulnerable to a SQL UNION Injection attack (or some type of SQL injection attack). The code ...
0
votes
2
answers
404
views
How to fix SQL injection if we have to use DB name dynamically in SQL Server?
This is the implementation in code: the schema name comes from a configuration file and is different for each environment. Sonar throws SQL injection alert at this statement:
select *
from dbName.dbo....
1
vote
0
answers
41
views
Why is injection data not returned?
I am learning about SQLI vulnerabilities, created an application in Flask with different vulnerable fields. One of these fields are HTTP headers.
# Página para configurar una cabecera HTTP con un ...
2
votes
1
answer
80
views
How to reduce vulnerability to cyber attacks from injection?
I have very little knowledge about SQL injection, and there are probably other threats I am unaware of out there for stealing company data, how would I make this python code better in regards to ...