Skip to content

CVE-2026-22730 SQL Injection in Spring AI’s MariaDB Vector S...#2029

Open
carlospolop wants to merge 1 commit intomasterfrom
update_CVE-2026-22730__SQL_Injection_in_Spring_AI_s_Maria_20260319_131806
Open

CVE-2026-22730 SQL Injection in Spring AI’s MariaDB Vector S...#2029
carlospolop wants to merge 1 commit intomasterfrom
update_CVE-2026-22730__SQL_Injection_in_Spring_AI_s_Maria_20260319_131806

Conversation

@carlospolop
Copy link
Collaborator

🤖 Automated Content Update

This PR was automatically generated by the HackTricks News Bot based on a technical blog post.

📝 Source Information

🎯 Content Summary

Title / context
The post details CVE-2026-22730, a SQL injection in Spring AI’s MariaDB Vector Store filter handling. The issue was discovered during a pre-production review of an internal RAG (retrieval-augmented generation) assistant where access control relied on metadata filters (e.g., HR users should only retrieve documents with department: HR). Because the filter-to-SQL conversion incorrectly handles string escaping, an attacker ca...

🔧 Technical Details

When an application/framework converts a structured filter AST into a raw SQL predicate string, any value-serialization routine that emits strings as '%s' without escaping creates a classic SQLi primitive: injecting a single quote (') closes the literal early and the remaining payload is parsed as SQL (e.g., ' OR '1'='1, URL-encoded as %27%20OR%20%271%27%3D%271). If that resulting predicate fragment is inserted into queries via string formatting/concatenation (rather than parameter binding), attackers can create always-true predicates to bypass row/tenant/metadata authorization checks, including in RAG systems where leaked rows may only appear indirectly in LLM-generated answers.

If the same untrusted predicate fragment is also reused in write operations (e.g., DELETE FROM table WHERE <predicate> executed via jdbcTemplate.update(sql)), the attacker can reuse the always-true predicate to mass-de...

🤖 Agent Actions

Summary:

  • Added a new subsection on SQLi via filter AST → SQL predicate converters, including payload pattern, impact, and hunting tips in src/pentesting-web/sql-injection/README.md.
  • Added the blog URL to the References section in src/pentesting-web/sql-injection/README.md.

Tests: Not run.


This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.

@carlospolop
Copy link
Collaborator Author

🔗 Additional Context

Original Blog Post: https://blog.securelayer7.net/cve-2026-22730-sql-injection-spring-ai-mariadb/

Content Categories: Based on the analysis, this content was categorized under "Pentesting Web -> SQL Injection (add a subsection like: "SQLi via AST/filter-to-SQL converters (Spring AI MariaDB Vector Store / JSON_VALUE predicates)")".

Repository Maintenance:

  • MD Files Formatting: 954 files processed

Review Notes:

  • This content was automatically processed and may require human review for accuracy
  • Check that the placement within the repository structure is appropriate
  • Verify that all technical details are correct and up-to-date
  • All .md files have been checked for proper formatting (headers, includes, etc.)

Bot Version: HackTricks News Bot v1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant