mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-18 20:15:14 +02:00
Critical bug fixes and recall improvements (#68)
This commit is contained in:
parent
7d0e7320e2
commit
55247b7fcd
352 changed files with 60069 additions and 900 deletions
24
tests/fixtures/realistic/sqli_xlang/SqliJavaParamTaintedBinds.java
vendored
Normal file
24
tests/fixtures/realistic/sqli_xlang/SqliJavaParamTaintedBinds.java
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// Phase 15 deferred-fix negative — Java JPA parameterised query with
|
||||
// TAINTED bind value. The JPQL string at arg 0 of
|
||||
// `entityManager.createQuery` is a literal; the user-controlled `name`
|
||||
// is bound via `setParameter`, which the JPA layer escapes through the
|
||||
// JDBC parameterised path. Without payload-arg gating on
|
||||
// `entityManager.createQuery` (Phase 15 deferred fix in
|
||||
// `labels/java.rs::GATED_SINKS`), the flat rule's all-arg activation
|
||||
// combined with `setParameter`'s arg→return propagation could surface a
|
||||
// SQL_QUERY finding on the chain. The Destination gate restricts
|
||||
// `sink_payload_args` to `&[0]`, narrowing the scan to the JPQL string.
|
||||
package com.example;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.Query;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class SqliJavaParamTaintedBinds {
|
||||
public Object lookup(HttpServletRequest request, EntityManager entityManager) {
|
||||
String name = request.getParameter("name");
|
||||
Query q = entityManager.createQuery("SELECT u FROM User u WHERE u.name = :name");
|
||||
q.setParameter("name", name);
|
||||
return q.getResultList();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue