This issue has been created
There is 1 update.
 
 
LLM AI Integration / cid:jira-generated-image-avatar-155c8029-8d13-48ee-9c34-7207d4db9ceb LLMAI-213 Open

The chat completions REST error path reflects the request origin in the CORS header

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-4a0a74ac-843a-4493-b93d-9e9f46ab3c01 Paul Pantiru created this issue on 16/Oct/26 09:11
 
Summary: The chat completions REST error path reflects the request origin in the CORS header
Issue Type: cid:jira-generated-image-avatar-155c8029-8d13-48ee-9c34-7207d4db9ceb Bug
Affects Versions: 0.9
Assignee: Unassigned
Created: 16/Oct/26 09:11
Priority: cid:jira-generated-image-static-minor-091eaa61-0253-431d-8e70-6c78f5980baa Minor
Reporter: Paul Pantiru
Description:

getCompletions computes the allowed origin through CORSUtils.matchOrigin (allow-list of the chat origin configuration, null when the origin is not listed) and sets it on the success responses (about line 77). The RequestError branch (about line 105) sets Access-Control-Allow-Origin to the raw request origin instead, so any site gets a readable cross-origin answer for the error case. No Access-Control-Allow-Credentials header is set, so a browser does not send the wiki cookies on such a request and the readable content is the OpenAI-style error body (provider or model error text) only. Still an allow-list bypass and a disclosure of error details to arbitrary origins.

 
 

1 update

 
cid:jira-generated-image-avatar-4a0a74ac-843a-4493-b93d-9e9f46ab3c01 Changes by Paul Pantiru on 16/Oct/26 09:16
 
Assignee: Paul Pantiru