You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/README.md
+13-7Lines changed: 13 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,8 @@ embedding model and storing them in a vector database for efficient retrieval. A
74
74
is embedded, similar vectors are retrieved from the database with their textual representation, and those results are passed to an LLM to generate a
75
75
context-aware response.
76
76
77
+
### Vulnerability
78
+
77
79
This attack vector is designed to mimic a genuine embedding-inversion attack.
78
80
Classic inversion attacks reconstruct portions of a sentence by training a model to reverse the embedding vector,
79
81
an approach that depends on each word’s semantic meaning being preserved in the embedding space.
@@ -87,7 +89,8 @@ In shared chat sessions, the embeddings can be read by the users who imported th
87
89
by embedding all possible flag characters through the service and storing the resulting vectors.
88
90
The flag can then be reconstructed.
89
91
90
-
### Attack Flow Chart
92
+
### Exploit
93
+
In order to exploit, the following steps are performed:
91
94
```mermaid
92
95
flowchart TD
93
96
A["Get flag hint session ID"] --> B["Register an attacker user"]
@@ -117,6 +120,8 @@ In praxis, this means that the model would produce an Out-Of-Vocabulary (OOV) ve
117
120
### Background
118
121
This vulnerability exists in the custom authentication handshake, that is performed
119
122
to obtain a special JWT that acts as authentication for MCP (Model Context Protocol) requests.
123
+
124
+
### Vulnerability
120
125
The service implements a challenge-response authentication computing first a session key from the shared secret (the created access token), client and server challenge
121
126
and later on using AES CFB8 encryption to generate client credentials from an all-zero IV and client credentials with the session key as key.
122
127
Because the server challenge is randomly generated, the resulting session key is also effectively random and is then used to encrypt the IV and the client challenge.
@@ -129,8 +134,8 @@ also set to all zeros. The attacker is now authenticated.
129
134

130
135
131
136
132
-
### Attack Flow Chart
133
-
137
+
### Exploit
138
+
In order to exploit, the following steps are performed:
134
139
```mermaid
135
140
flowchart TD
136
141
A["Get flag hint user and session ID"] --> B["Create 8 byte long all-zero client challenge"]
@@ -143,16 +148,17 @@ flowchart TD
143
148
G -->|Yes| I["Receive JWT token"]
144
149
H -->|Yes| C
145
150
H -->|No| J["Attack failed after X attempts"]
146
-
I --> K["Connect to MCP interface<br/>using JWT token in authentication header"]
151
+
I --> K["Connect to MCP interface<br/>using JWT in authentication header"]
147
152
K --> L["Read messages from<br/>target chat session"]
148
153
L --> M["Extract flag from messages"]
149
154
M --> N["Remove eventual padding characters"]
150
155
N --> O["Success: Flag recovered"]
151
-
152
-
153
156
```
157
+
Since the handshake is performed in two successive steps, data has to be stored in on server-side in memory. The client
158
+
receives in the first response a memory key that must be sent in the second request to continue the handshake.
159
+
154
160
### Fix
155
-
To fix this vulnerability, the IV should be set to a random value instead of all-zero bytes.
161
+
To fix this vulnerability, the IV should be initialized with a random for each handshake value instead of all-zero bytes.
156
162
157
163
# Potential Enhancements
158
164
## OpenID Connect OAuth 2.0 Authorization Code Flow with PKCE
0 commit comments