CVE-2026-22730 SQL Injection in Spring AI’s MariaDB Vector S...#2029
Open
carlospolop wants to merge 1 commit intomasterfrom
Open
CVE-2026-22730 SQL Injection in Spring AI’s MariaDB Vector S...#2029carlospolop wants to merge 1 commit intomasterfrom
carlospolop wants to merge 1 commit intomasterfrom
Conversation
Collaborator
Author
🔗 Additional ContextOriginal 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:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 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 viajdbcTemplate.update(sql)), the attacker can reuse the always-true predicate to mass-de...🤖 Agent Actions
Summary:
src/pentesting-web/sql-injection/README.md.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.