Skip to content

In-depth lesson · SQL injection

Root causes

Every point the SQL injection reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1 to 31 of 31
  1. User input is concatenated into SQL queries instead of being bound as parameters.

    Seen in 52 reports
  2. A database library did not properly escape parameters.

    Seen in 8 reports
  3. URL path values were inserted into queries without validation.

    Seen in 4 reports
  4. Connectors re-escape their own output or inject names into statements.

    Seen in 3 reports
  5. A Solr query was built from user input without escaping, allowing local parameter injection.

    Seen in 2 reports
  6. User input in a parameter was concatenated into a SQL query without parameterisation or proper escaping.

    Seen in 2 reports
  7. Alias validation regexes miss characters used for quoting in the database.

    Seen in 2 reports
  8. GraphQL parameters are not sanitised in the same way as normal input fields.

    Seen in 1 report
  9. Escaping is applied only at the XML layer and not at the SQL layer.

    Seen in 1 report
  10. Projection restrictions in a content provider are enforced for only one URI.

    Seen in 1 report
  11. A test API service lacked authentication and input sanitisation and had xp_cmdshell enabled.

    Seen in 1 report
  12. A loose comparison let user input reach an unserialise call.

    Seen in 1 report
  13. An ORM method accepted raw ordering fragments without validation.

    Seen in 1 report
  14. A plugin failed to escape POST parameters before using them in SQL queries.

    Seen in 1 report
  15. A shortcode handler placed user-controlled order parameters directly into an ORDER BY clause.

    Seen in 1 report
  16. A preview AJAX action lacked authentication.

    Seen in 1 report
  17. The WordPress DB class prepare method was implemented badly.

    Seen in 1 report
  18. Spring @Query usage allowed N1QL injection.

    Seen in 1 report
  19. A scientific notation bug in MySQL left WAF clients vulnerable.

    Seen in 1 report
  20. The application concatenated the URL path directly into a SQL query without parameterisation or sanitisation.

    Seen in 1 report
  21. A request parameter was concatenated directly into a SQL query without parameterisation or input validation.

    Seen in 1 report
  22. Search terms were split on whitespace but then inserted into a SQL query without parameterisation or escaping.

    Seen in 1 report
  23. A content provider passed caller-supplied parameters straight into SQL statements without sanitisation or parameterisation.

    Seen in 1 report
  24. SQL queries were built by concatenating user-supplied input into the statement without parameterised queries or escaping.

    Seen in 1 report
  25. A POST parameter was passed directly into a SQL query without validation or parameterisation.

    Seen in 1 report
  26. Raw SQL was interpolated into an EXPLAIN ANALYZE query without sanitisation, letting an attacker roll back the wrapping transaction and persist extra statements.

    Seen in 1 report
  27. Sanitising strips tags but does not escape SQL.

    Seen in 1 report
  28. Query connectors were inserted with unsafe string formatting.

    Seen in 1 report
  29. JSON object keys were used as column aliases without escaping.

    Seen in 1 report
  30. Managed WAF rule sets have incomplete coverage of SQL grammar.

    Seen in 1 report
  31. Query parameters were passed straight into a document database query, letting operators change the lookup.

    Seen in 1 report