agent-threat-rules 2.1.3 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-executor.d.ts +1 -1
- package/dist/action-executor.d.ts.map +1 -1
- package/dist/action-executor.js +13 -11
- package/dist/action-executor.js.map +1 -1
- package/dist/adapters/default-adapter.d.ts +2 -1
- package/dist/adapters/default-adapter.d.ts.map +1 -1
- package/dist/adapters/default-adapter.js +14 -11
- package/dist/adapters/default-adapter.js.map +1 -1
- package/dist/adapters/stdio-adapter.d.ts +2 -1
- package/dist/adapters/stdio-adapter.d.ts.map +1 -1
- package/dist/adapters/stdio-adapter.js +43 -26
- package/dist/adapters/stdio-adapter.js.map +1 -1
- package/dist/converters/index.d.ts +4 -0
- package/dist/converters/index.d.ts.map +1 -1
- package/dist/converters/index.js +2 -0
- package/dist/converters/index.js.map +1 -1
- package/dist/converters/sage-reverse.d.ts +52 -0
- package/dist/converters/sage-reverse.d.ts.map +1 -0
- package/dist/converters/sage-reverse.js +216 -0
- package/dist/converters/sage-reverse.js.map +1 -0
- package/dist/converters/sage.d.ts +123 -0
- package/dist/converters/sage.d.ts.map +1 -0
- package/dist/converters/sage.js +702 -0
- package/dist/converters/sage.js.map +1 -0
- package/dist/types.d.ts +24 -17
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -1
- package/rules/context-exfiltration/ATR-2026-00449-spring-ai-chatmemory-cross-user-leak.yaml +196 -0
- package/rules/data-poisoning/ATR-2026-00450-spring-ai-prompt-memory-poisoning.yaml +196 -0
- package/rules/privilege-escalation/ATR-2026-00451-litellm-admin-sqli-cisa-kev.yaml +204 -0
- package/rules/tool-poisoning/ATR-2026-00448-spring-ai-milvus-filter-injection.yaml +193 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
title: "LiteLLM Proxy Admin Endpoint SQL Injection — CISA KEV (CVE-2026-42208)"
|
|
2
|
+
id: ATR-2026-00451
|
|
3
|
+
rule_version: 1
|
|
4
|
+
status: experimental
|
|
5
|
+
description: >
|
|
6
|
+
Detects exploitation of CVE-2026-42208 (Critical, CVSS 9.3), an
|
|
7
|
+
unauthenticated SQL injection in LiteLLM proxy admin endpoints
|
|
8
|
+
(/team, /key, /user, /spend, /budget). Added to CISA's Known
|
|
9
|
+
Exploited Vulnerabilities catalog on 2026-05-08 with federal
|
|
10
|
+
remediation due 2026-05-11; active exploitation observed against
|
|
11
|
+
financial services and healthcare deployments. The vulnerable
|
|
12
|
+
endpoint concatenates path / query / body parameters directly into
|
|
13
|
+
Postgres queries, allowing classic SQLi shapes (tautology
|
|
14
|
+
authentication bypass `' OR 1=1 --`, UNION-based exfiltration of
|
|
15
|
+
api_keys / users / model_bindings tables, time-based blind via
|
|
16
|
+
`pg_sleep()`, DROP / TRUNCATE primitives for destructive impact).
|
|
17
|
+
This rule detects exploit payloads landing on the admin endpoint
|
|
18
|
+
surface — focused on the LiteLLM-specific path prefixes so generic
|
|
19
|
+
SQLi false positives elsewhere do not light up. CWE-89.
|
|
20
|
+
Patches in LiteLLM >= 1.48.3; this rule detects exploit attempts
|
|
21
|
+
against unpatched deployments and provides defence-in-depth
|
|
22
|
+
post-patch by catching the SQLi payload shape regardless of upstream
|
|
23
|
+
patch state.
|
|
24
|
+
author: "ATR Community"
|
|
25
|
+
date: "2026/05/12"
|
|
26
|
+
schema_version: "0.1"
|
|
27
|
+
detection_tier: pattern
|
|
28
|
+
maturity: test
|
|
29
|
+
severity: critical
|
|
30
|
+
|
|
31
|
+
references:
|
|
32
|
+
owasp_llm:
|
|
33
|
+
- "LLM05:2025 - Improper Output Handling"
|
|
34
|
+
- "LLM10:2025 - Unbounded Consumption"
|
|
35
|
+
owasp_agentic:
|
|
36
|
+
- "ASI03:2026 - Identity and Privilege Abuse"
|
|
37
|
+
- "ASI07:2026 - Insecure Agent Infrastructure"
|
|
38
|
+
mitre_atlas:
|
|
39
|
+
- "AML.T0049 - Exploit Public-Facing Application"
|
|
40
|
+
- "AML.T0024 - Exfiltration via ML Inference API"
|
|
41
|
+
mitre_attack:
|
|
42
|
+
- "T1190 - Exploit Public-Facing Application"
|
|
43
|
+
- "T1059 - Command and Scripting Interpreter"
|
|
44
|
+
cve:
|
|
45
|
+
- "CVE-2026-42208"
|
|
46
|
+
|
|
47
|
+
metadata_provenance:
|
|
48
|
+
mitre_atlas: human-reviewed
|
|
49
|
+
mitre_attack: human-reviewed
|
|
50
|
+
owasp_llm: human-reviewed
|
|
51
|
+
owasp_agentic: human-reviewed
|
|
52
|
+
cve: human-reviewed
|
|
53
|
+
|
|
54
|
+
compliance:
|
|
55
|
+
eu_ai_act:
|
|
56
|
+
- article: "15"
|
|
57
|
+
context: "CVE-2026-42208 allows unauthenticated SQL execution against the LiteLLM proxy backend Postgres, exfiltrating provider API keys, model bindings, and user accounts; Article 15 cybersecurity requirements mandate parameterised queries in any AI control-plane component."
|
|
58
|
+
strength: primary
|
|
59
|
+
- article: "9"
|
|
60
|
+
context: "Article 9 risk management must enumerate proxy admin-endpoint SQLi as a high-risk class — a single bypass exposes every downstream LLM provider key the proxy holds. CISA KEV listing confirms active in-the-wild exploitation."
|
|
61
|
+
strength: primary
|
|
62
|
+
nist_ai_rmf:
|
|
63
|
+
- subcategory: "MP.5.1"
|
|
64
|
+
context: "SQLi payloads targeting AI proxy admin endpoints must be tracked as a primary attack class against AI control-plane infrastructure; CISA KEV inclusion makes this a federally-prioritised remediation."
|
|
65
|
+
strength: primary
|
|
66
|
+
- subcategory: "MG.4.1"
|
|
67
|
+
context: "Active exploitation against LiteLLM proxy admin endpoints requires immediate incident response; this rule generates the alert needed to initiate the MG.4.1 AI incident response process."
|
|
68
|
+
strength: primary
|
|
69
|
+
- subcategory: "MG.2.3"
|
|
70
|
+
context: "Risk treatment plans under MG.2.3 must require parameterised queries on every admin endpoint of any AI proxy / gateway component."
|
|
71
|
+
strength: primary
|
|
72
|
+
iso_42001:
|
|
73
|
+
- clause: "8.6"
|
|
74
|
+
context: "Operational controls under clause 8.6 must prohibit string concatenation of HTTP parameters into SQL queries in any AI control-plane component; parameterised query builders are mandatory."
|
|
75
|
+
strength: primary
|
|
76
|
+
|
|
77
|
+
tags:
|
|
78
|
+
category: privilege-escalation
|
|
79
|
+
subcategory: admin-endpoint-sqli-cve-kev
|
|
80
|
+
scan_target: both
|
|
81
|
+
confidence: high
|
|
82
|
+
|
|
83
|
+
agent_source:
|
|
84
|
+
type: tool_call
|
|
85
|
+
framework:
|
|
86
|
+
- litellm
|
|
87
|
+
- any
|
|
88
|
+
provider:
|
|
89
|
+
- any
|
|
90
|
+
|
|
91
|
+
detection:
|
|
92
|
+
condition: any
|
|
93
|
+
false_positives:
|
|
94
|
+
- "Legitimate documentation or changelog text discussing CVE-2026-42208 patch notes."
|
|
95
|
+
- "Static analysis tooling output documenting SQLi patterns for defensive purposes."
|
|
96
|
+
- "CISA KEV catalog entries discussing CVE-2026-42208 for awareness."
|
|
97
|
+
- "Patched LiteLLM proxy deployments that use parameterised query builders."
|
|
98
|
+
conditions:
|
|
99
|
+
- field: content
|
|
100
|
+
operator: regex
|
|
101
|
+
value: '(?i)/(?:team|key|user|spend|budget|customer|model|organization)/[^?\n]{0,80}[\x27"]\s*(?:or|and)\s+(?:1\s*=+\s*1|true\b|\d+\s*=+\s*\d+)\s*(?:--(?=\s|$|["\x27\)])|/\*)'
|
|
102
|
+
description: "LiteLLM admin endpoint path with classic tautology SQLi (1=1 / true / N=N) + SQL-comment terminator (-- at EOL or /*) — CISA KEV CVE-2026-42208 canonical exploit shape; excludes markdown `#` heading"
|
|
103
|
+
|
|
104
|
+
- field: content
|
|
105
|
+
operator: regex
|
|
106
|
+
value: '(?i)/(?:team|key|user|spend|budget|customer|model|organization)/[^?\n]{0,80}[\x27"]?\s*;\s*(?:drop|truncate|delete)\s+(?:table|from)\s+\w'
|
|
107
|
+
description: "LiteLLM admin endpoint path with stacked destructive statement (DROP/TRUNCATE/DELETE TABLE)"
|
|
108
|
+
|
|
109
|
+
- field: content
|
|
110
|
+
operator: regex
|
|
111
|
+
value: '(?i)/(?:team|key|user|spend|budget|customer|model|organization)/[^?\n]{0,120}\bunion\s+(?:all\s+)?select\s+'
|
|
112
|
+
description: "LiteLLM admin endpoint with UNION SELECT exfiltration probe"
|
|
113
|
+
|
|
114
|
+
- field: content
|
|
115
|
+
operator: regex
|
|
116
|
+
value: '(?i)/(?:team|key|user|spend|budget|customer|model|organization)/[^?\n]{0,120}\bpg_sleep\s*\(\s*\d+\s*\)'
|
|
117
|
+
description: "LiteLLM admin endpoint with Postgres time-based blind primitive `pg_sleep(N)`"
|
|
118
|
+
|
|
119
|
+
- field: content
|
|
120
|
+
operator: regex
|
|
121
|
+
value: '(?i)\b(?:team_id|key_id|user_id|customer_id|model_id)\b["\x27]?\s*[:=]\s*["\x27]?[^"\x27\n]{0,40}[\x27"]\s*(?:or|and)\s+(?:1\s*=+\s*1|true\b|\d+\s*=+\s*\d+)\s*(?:--(?=\s|$|["\x27\)])|/\*)'
|
|
122
|
+
description: "LiteLLM admin endpoint parameter (team_id/key_id/user_id/customer_id/model_id) carrying a tautology + SQL-comment terminator (handles JSON key form team_id\":\")"
|
|
123
|
+
|
|
124
|
+
- field: content
|
|
125
|
+
operator: regex
|
|
126
|
+
value: '(?i)\b(?:team_id|key_id|user_id|customer_id|model_id)\b[^\n]{0,80}\bunion\s+(?:all\s+)?select\b'
|
|
127
|
+
description: "Admin-endpoint parameter carrying UNION SELECT — exfil chain (handles JSON key form)"
|
|
128
|
+
|
|
129
|
+
- field: content
|
|
130
|
+
operator: regex
|
|
131
|
+
value: '(?i)(?:litellm|proxy)\b[^.\n]{0,80}/(?:team|key|user|spend|budget)/[^?\n]{0,120}\b(?:information_schema\.tables|pg_catalog\.\w+|pg_user|pg_shadow|version\s*\(\s*\))\b'
|
|
132
|
+
description: "LiteLLM proxy admin path probing Postgres metadata views (information_schema.tables, pg_user, version()) — recon stage of CVE-2026-42208 exploitation; requires concrete metadata identifiers, not bare `current_user`"
|
|
133
|
+
|
|
134
|
+
- field: content
|
|
135
|
+
operator: regex
|
|
136
|
+
value: '(?i)/(?:team|key|user|spend|budget|customer|model|organization)/[^?\n]{0,120}\b(?:extractvalue|updatexml|load_extension)\s*\('
|
|
137
|
+
description: "LiteLLM admin endpoint with error-based / out-of-band SQLi primitives (extractvalue, updatexml, load_extension)"
|
|
138
|
+
|
|
139
|
+
response:
|
|
140
|
+
actions:
|
|
141
|
+
- block_input
|
|
142
|
+
- alert
|
|
143
|
+
- escalate
|
|
144
|
+
- snapshot
|
|
145
|
+
notify:
|
|
146
|
+
- security_team
|
|
147
|
+
|
|
148
|
+
remediation: >
|
|
149
|
+
Upgrade LiteLLM proxy to >= 1.48.3 immediately — CISA KEV listing
|
|
150
|
+
with federal remediation due 2026-05-11 means active exploitation
|
|
151
|
+
is occurring in the wild. Rotate every provider API key and user
|
|
152
|
+
credential that the proxy database has held since deployment.
|
|
153
|
+
Audit Postgres logs for queries against api_keys, users,
|
|
154
|
+
model_bindings, and budget tables originating from the proxy
|
|
155
|
+
service account. Replace string-concatenated SQL in admin handlers
|
|
156
|
+
with parameterised queries / a query builder. Restrict admin
|
|
157
|
+
endpoint exposure to a private network or VPN until upgrade is
|
|
158
|
+
verified.
|
|
159
|
+
|
|
160
|
+
test_cases:
|
|
161
|
+
true_positives:
|
|
162
|
+
- input: "GET /team/1' OR 1=1 -- HTTP/1.1"
|
|
163
|
+
expected: triggered
|
|
164
|
+
description: "Canonical tautology SQLi against /team admin endpoint — CISA KEV CVE-2026-42208 shape"
|
|
165
|
+
- input: 'GET /key/foo''; DROP TABLE api_keys -- '
|
|
166
|
+
expected: triggered
|
|
167
|
+
description: "Stacked DROP TABLE against /key admin endpoint"
|
|
168
|
+
- input: "GET /user/1 UNION ALL SELECT api_key, user_id FROM api_keys --"
|
|
169
|
+
expected: triggered
|
|
170
|
+
description: "UNION-based exfil of api_keys via /user admin endpoint"
|
|
171
|
+
- input: "GET /spend/bob' AND pg_sleep(5)-- HTTP/1.1"
|
|
172
|
+
expected: triggered
|
|
173
|
+
description: "Time-based blind SQLi via pg_sleep on /spend admin endpoint"
|
|
174
|
+
- input: '{"team_id":"abc'' or 1=1 --"}'
|
|
175
|
+
expected: triggered
|
|
176
|
+
description: "team_id parameter carrying tautology + comment terminator"
|
|
177
|
+
- input: '{"key_id":"x'' UNION ALL SELECT api_key FROM api_keys --"}'
|
|
178
|
+
expected: triggered
|
|
179
|
+
description: "key_id parameter with UNION exfil"
|
|
180
|
+
- input: "litellm proxy /budget/1 information_schema.tables current_user"
|
|
181
|
+
expected: triggered
|
|
182
|
+
description: "Recon stage probing Postgres metadata via /budget admin endpoint"
|
|
183
|
+
- input: "GET /team/1' AND extractvalue(1,concat(0x7e,(SELECT version())))-- HTTP/1.1"
|
|
184
|
+
expected: triggered
|
|
185
|
+
description: "Error-based SQLi using extractvalue against /team admin endpoint"
|
|
186
|
+
true_negatives:
|
|
187
|
+
- input: "LiteLLM 1.48.3 release notes: parameterised query builder replaces concat in admin endpoints. Mitigates CVE-2026-42208 (CISA KEV)."
|
|
188
|
+
expected: not_triggered
|
|
189
|
+
description: "Patch changelog mentioning the CVE should not trigger"
|
|
190
|
+
- input: "CISA added CVE-2026-42208 to the KEV catalog on 2026-05-08 with federal remediation due 2026-05-11."
|
|
191
|
+
expected: not_triggered
|
|
192
|
+
description: "Defensive awareness post about the KEV listing"
|
|
193
|
+
- input: "GET /team/abc123 HTTP/1.1"
|
|
194
|
+
expected: not_triggered
|
|
195
|
+
description: "Benign admin-endpoint GET without SQLi payload"
|
|
196
|
+
- input: 'curl -X POST /key -d ''{"alias":"prod","spend_limit":100}'''
|
|
197
|
+
expected: not_triggered
|
|
198
|
+
description: "Standard /key endpoint POST with normal payload"
|
|
199
|
+
- input: "The /spend endpoint returns aggregated cost per team for the last 30 days."
|
|
200
|
+
expected: not_triggered
|
|
201
|
+
description: "API documentation describing /spend behaviour"
|
|
202
|
+
- input: 'team_id = "team_abc123"'
|
|
203
|
+
expected: not_triggered
|
|
204
|
+
description: "Realistic team_id value with no injection content"
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
title: "Spring AI MilvusVectorStore Filter Expression Injection (CVE-2026-41705)"
|
|
2
|
+
id: ATR-2026-00448
|
|
3
|
+
rule_version: 1
|
|
4
|
+
status: experimental
|
|
5
|
+
description: >
|
|
6
|
+
Detects exploitation of CVE-2026-41705 (High), filter-expression injection
|
|
7
|
+
in Spring AI's MilvusVectorStore. The vulnerable sink concatenates a
|
|
8
|
+
user/LLM-controlled fragment into a Milvus DSL filter expression passed
|
|
9
|
+
to MilvusVectorStore.delete() or .similaritySearch() without quoting or
|
|
10
|
+
parameterisation. Attacker-controlled input breaks out of the intended
|
|
11
|
+
clause and injects new Milvus DSL operators ( == , in[ , like ), boolean
|
|
12
|
+
combinators ( or , and ), trailing terminators ( ; -- ), or escape
|
|
13
|
+
bypasses ( like '%' ESCAPE '\\' ) to broaden the deletion / retrieval
|
|
14
|
+
scope, exfiltrate or wipe arbitrary collection entries, or bypass
|
|
15
|
+
access-control filters baked into the original expression. This rule
|
|
16
|
+
detects the LLM-output / user-input payload shapes that reach the
|
|
17
|
+
Milvus filter sink: filter-context fields containing unbalanced quotes,
|
|
18
|
+
Milvus operators combined with boolean chaining, or known
|
|
19
|
+
filter-bypass primitives. CWE-89, CWE-1287. Patches in Spring AI
|
|
20
|
+
>= 1.0.0; this rule detects exploit attempts against unpatched
|
|
21
|
+
deployments and provides defence-in-depth post-patch by catching the
|
|
22
|
+
injection payload shape regardless of upstream patch state.
|
|
23
|
+
author: "ATR Community"
|
|
24
|
+
date: "2026/05/12"
|
|
25
|
+
schema_version: "0.1"
|
|
26
|
+
detection_tier: pattern
|
|
27
|
+
maturity: test
|
|
28
|
+
severity: high
|
|
29
|
+
|
|
30
|
+
references:
|
|
31
|
+
owasp_llm:
|
|
32
|
+
- "LLM05:2025 - Improper Output Handling"
|
|
33
|
+
- "LLM08:2025 - Vector and Embedding Weaknesses"
|
|
34
|
+
owasp_agentic:
|
|
35
|
+
- "ASI04:2026 - Memory and Knowledge Base Poisoning"
|
|
36
|
+
- "ASI05:2026 - Unexpected Code Execution"
|
|
37
|
+
mitre_atlas:
|
|
38
|
+
- "AML.T0051 - LLM Prompt Injection"
|
|
39
|
+
- "AML.T0070 - RAG Poisoning"
|
|
40
|
+
mitre_attack:
|
|
41
|
+
- "T1190 - Exploit Public-Facing Application"
|
|
42
|
+
cve:
|
|
43
|
+
- "CVE-2026-41705"
|
|
44
|
+
|
|
45
|
+
metadata_provenance:
|
|
46
|
+
mitre_atlas: human-reviewed
|
|
47
|
+
owasp_llm: human-reviewed
|
|
48
|
+
owasp_agentic: human-reviewed
|
|
49
|
+
cve: human-reviewed
|
|
50
|
+
|
|
51
|
+
compliance:
|
|
52
|
+
eu_ai_act:
|
|
53
|
+
- article: "15"
|
|
54
|
+
context: "CVE-2026-41705 allows unfiltered LLM output to drive Milvus DSL filter construction in Spring AI's MilvusVectorStore; Article 15 cybersecurity requirements mandate that high-risk AI systems parameterise downstream queries instead of concatenating model output into query strings."
|
|
55
|
+
strength: primary
|
|
56
|
+
- article: "9"
|
|
57
|
+
context: "Article 9 risk management must enumerate vector-store filter injection as a high-risk class — the RAG retrieval / deletion path is typically treated as low-risk infrastructure but actually reaches a privileged datastore."
|
|
58
|
+
strength: primary
|
|
59
|
+
nist_ai_rmf:
|
|
60
|
+
- subcategory: "MP.5.1"
|
|
61
|
+
context: "Adversarial inputs that inject Milvus DSL fragments into RAG filter expressions must be tracked as a primary input-attack class affecting vector-store integrations."
|
|
62
|
+
strength: primary
|
|
63
|
+
- subcategory: "MG.2.3"
|
|
64
|
+
context: "Risk treatment plans under MG.2.3 must require parameterised filter construction in any code path that consumes LLM output and reaches a vector-store query / delete API."
|
|
65
|
+
strength: primary
|
|
66
|
+
iso_42001:
|
|
67
|
+
- clause: "8.6"
|
|
68
|
+
context: "Operational controls under clause 8.6 must prohibit LLM-generated or user-supplied content from being string-concatenated into vector-store filter expressions; parameterised filter builders are mandatory."
|
|
69
|
+
strength: primary
|
|
70
|
+
|
|
71
|
+
tags:
|
|
72
|
+
category: tool-poisoning
|
|
73
|
+
subcategory: vector-store-filter-injection
|
|
74
|
+
scan_target: both
|
|
75
|
+
confidence: high
|
|
76
|
+
|
|
77
|
+
agent_source:
|
|
78
|
+
type: tool_call
|
|
79
|
+
framework:
|
|
80
|
+
- spring-ai
|
|
81
|
+
- any
|
|
82
|
+
provider:
|
|
83
|
+
- any
|
|
84
|
+
|
|
85
|
+
detection:
|
|
86
|
+
condition: any
|
|
87
|
+
false_positives:
|
|
88
|
+
- "Legitimate documentation or changelog text discussing CVE-2026-41705 patch notes."
|
|
89
|
+
- "Static analysis tooling output documenting Milvus filter injection patterns for defensive purposes."
|
|
90
|
+
- "Patched Spring AI MilvusVectorStore deployments that use parameterised filter builders."
|
|
91
|
+
conditions:
|
|
92
|
+
- field: content
|
|
93
|
+
operator: regex
|
|
94
|
+
value: '(?i)\b(?:filter|filter_expr|filterExpression)\b[^\n]{0,40}(?:==|!=)\s*\d+[^\n]{0,20}\b(?:or|and)\s+(?:1\s*==\s*1|true\b|\d+\s*==\s*\d+|\w+\s*==\s*\d+)'
|
|
95
|
+
description: "Milvus filter field with numeric comparator followed by boolean chain into a tautology (or 1==1, or true, or id==N) — primary CVE-2026-41705 injection shape"
|
|
96
|
+
|
|
97
|
+
- field: content
|
|
98
|
+
operator: regex
|
|
99
|
+
value: '(?i)\b(?:filter|filter_expr|filterExpression)\b[^\n]{0,80}\\?["\x27][^\n]{0,40}\)\s*(?:or|and)\s+\w+\s*(?:==|in\s*\[)'
|
|
100
|
+
description: "Filter expression with closing-paren breakout followed by or/and and a fresh Milvus comparator/in-operator — quote-and-paren breakout"
|
|
101
|
+
|
|
102
|
+
- field: content
|
|
103
|
+
operator: regex
|
|
104
|
+
value: '(?i)(?:MilvusVectorStore|milvus[-_]?client|milvus[-_]?service)\b[^.\n]{0,80}\.(?:delete|similaritysearch|similarity_search|search)\s*\([^)\n]{0,200}\+\s*\w'
|
|
105
|
+
description: "MilvusVectorStore.delete()/similaritySearch() call whose argument list contains string concatenation — code-level smell that enables CVE-2026-41705"
|
|
106
|
+
|
|
107
|
+
- field: content
|
|
108
|
+
operator: regex
|
|
109
|
+
value: '(?i)\b(?:filter|filter_expr|filterExpression)\b[^\n]{0,40}\bin\s*\[[^\]\n]{0,80}\]\s*(?:or|and)\s+\w+\s*(?:==|!=)'
|
|
110
|
+
description: "Milvus `in[...]` clause followed by or/and boolean chaining into a fresh comparator — injection past the in-clause"
|
|
111
|
+
|
|
112
|
+
- field: content
|
|
113
|
+
operator: regex
|
|
114
|
+
value: '(?i)\b(?:filter|filter_expr|filterExpression)\b[^\n]{0,80}["\x27]\s*;\s*(?:drop|delete|truncate|alter)\s+(?:table|from|collection)\b'
|
|
115
|
+
description: "Filter expression terminated with `;` followed by a destructive verb — classic injection terminator chain"
|
|
116
|
+
|
|
117
|
+
- field: content
|
|
118
|
+
operator: regex
|
|
119
|
+
value: '(?i)[\x27"]\s+(?:or|and)\s+(?:1\s*=+\s*1|true)\s*(?:--(?=\s|$|["\x27\)])|/\*)'
|
|
120
|
+
description: "Canonical SQL/DSL tautology with sentinel comment-out terminator (-- at EOL or /*) — conservative shape that excludes markdown `#` heading false positives; supports = and == comparator"
|
|
121
|
+
|
|
122
|
+
- field: content
|
|
123
|
+
operator: regex
|
|
124
|
+
value: '(?i)\blike\s+\\?["\x27]%\\?["\x27]\s+escape\s+\\?["\x27][\\\\\w]{0,8}\\?["\x27]'
|
|
125
|
+
description: "Milvus `like '%' ESCAPE` bypass primitive (supports JSON-escaped quotes around the `%` literal and 0..8 backslash/word chars inside the escape value) — used to defeat literal-character escaping in upstream filter builders"
|
|
126
|
+
|
|
127
|
+
- field: content
|
|
128
|
+
operator: regex
|
|
129
|
+
value: '(?i)\b(?:filter|filter_expr|filterExpression)\b[^\n]{0,80}\)\s+and\s+\w+\s*==\s*\d+'
|
|
130
|
+
description: "Paren-breakout in filter expression followed by AND-chain with new numeric comparator — secondary breakout shape"
|
|
131
|
+
|
|
132
|
+
response:
|
|
133
|
+
actions:
|
|
134
|
+
- block_input
|
|
135
|
+
- alert
|
|
136
|
+
- escalate
|
|
137
|
+
notify:
|
|
138
|
+
- security_team
|
|
139
|
+
|
|
140
|
+
remediation: >
|
|
141
|
+
Upgrade Spring AI to >= 1.0.0. Replace string-concatenated Milvus filter
|
|
142
|
+
expressions with parameterised filter builders; never interpolate LLM
|
|
143
|
+
output or user input directly into filter strings passed to
|
|
144
|
+
MilvusVectorStore.delete() or .similaritySearch(). Validate filter
|
|
145
|
+
fragments against an allowlist of operators / field names before
|
|
146
|
+
building the final expression. Treat LLM output as untrusted input
|
|
147
|
+
from a security perspective.
|
|
148
|
+
|
|
149
|
+
test_cases:
|
|
150
|
+
true_positives:
|
|
151
|
+
- input: '{"tool":"MilvusVectorStore.delete","args":{"filter":"id == 1 or 1 == 1"}}'
|
|
152
|
+
expected: triggered
|
|
153
|
+
description: "Tautology-based deletion-broadening injection — CVE-2026-41705 canonical shape"
|
|
154
|
+
- input: '{"tool":"MilvusVectorStore.similaritySearch","args":{"filter":"user_id == \"alice\") or id == 99"}}'
|
|
155
|
+
expected: triggered
|
|
156
|
+
description: "Closing-paren breakout followed by or chaining with comparator"
|
|
157
|
+
- input: 'milvusVectorStore.delete("id == " + userInput + " or true")'
|
|
158
|
+
expected: triggered
|
|
159
|
+
description: "Source-level concat against Milvus delete sink — code path that enables CVE-2026-41705"
|
|
160
|
+
- input: '{"filter":"name in [\"x\"] or tenant_id == 99"}'
|
|
161
|
+
expected: triggered
|
|
162
|
+
description: "in-operator followed by or chaining with new comparator — bypass of original access-control filter"
|
|
163
|
+
- input: '{"filter":"category == \"books\"; DROP TABLE collection"}'
|
|
164
|
+
expected: triggered
|
|
165
|
+
description: "Filter terminator + destructive verb — classic injection chain"
|
|
166
|
+
- input: "' or 1 == 1 --"
|
|
167
|
+
expected: triggered
|
|
168
|
+
description: "Canonical tautology + comment-out payload pasted into the user_input field"
|
|
169
|
+
- input: 'filter: "title like \"%\" escape \"\\\\\""'
|
|
170
|
+
expected: triggered
|
|
171
|
+
description: "Milvus like-escape bypass primitive"
|
|
172
|
+
- input: '{"filter":"user == \"bob\") and id == 1"}'
|
|
173
|
+
expected: triggered
|
|
174
|
+
description: "Paren-breakout into AND-chain with new comparator"
|
|
175
|
+
true_negatives:
|
|
176
|
+
- input: "The Spring AI 1.0.0 changelog notes that MilvusVectorStore now uses parameterised filter builders to mitigate CVE-2026-41705."
|
|
177
|
+
expected: not_triggered
|
|
178
|
+
description: "Documentation discussing the patch should not trigger"
|
|
179
|
+
- input: "Best practice: build Milvus filter expressions via the parameterised builder API instead of string concatenation."
|
|
180
|
+
expected: not_triggered
|
|
181
|
+
description: "Defensive guidance discussing the mitigation"
|
|
182
|
+
- input: 'milvusVectorStore.similaritySearch(SearchRequest.builder().query("hello").filter(parameterizedExpr).build())'
|
|
183
|
+
expected: not_triggered
|
|
184
|
+
description: "Properly parameterised similarity search using a builder — no concat with user input"
|
|
185
|
+
- input: "Reviewing this rule against CVE-2026-41705 to ensure regex coverage is correct."
|
|
186
|
+
expected: not_triggered
|
|
187
|
+
description: "Discussion of CVE in defensive context"
|
|
188
|
+
- input: 'filter: "category == \"books\""'
|
|
189
|
+
expected: not_triggered
|
|
190
|
+
description: "Single static comparator without boolean chaining or breakout"
|
|
191
|
+
- input: "The dataset contains records where the title field matches a specific pattern."
|
|
192
|
+
expected: not_triggered
|
|
193
|
+
description: "Benign English prose mentioning fields and patterns"
|