Skip to content

fix(security): close auth bypass gaps for connect/SO callbacks and audio codec masquerade - #252

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
security/fix-auth-bypasses-c5d39e7
Draft

fix(security): close auth bypass gaps for connect/SO callbacks and audio codec masquerade#252
cursor[bot] wants to merge 1 commit into
mainfrom
security/fix-auth-bypasses-c5d39e7

Conversation

@cursor

@cursor cursor Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes three medium-severity authorization bypasses found in scheduled security review at c5d39e71.

Findings fixed

1. Publish/play bypass with only on_connect_cb (Medium) — #249

  • Location: src/session/conn.rs
  • Impact: Remote clients could publish/play/relay after connect when the server configured only on_connect_cb as its auth hook.
  • Fix: Include on_connect_cb in requires_explicit_publish_auth() / requires_explicit_play_auth().

2. Publish/play bypass with only on_shared_object_cb (Medium) — #251

  • Location: src/session/conn.rs
  • Impact: Servers with only shared-object delivery configured implicitly allowed unauthorized publish/play/relay.
  • Fix: Include on_shared_object_cb in the explicit-auth cross-gates.

3. Enhanced audio codec masquerade (Medium) — #250

  • Location: src/session/conn.rs
  • Impact: Attackers could set IsExHeader bit with an invalid printable FourCC so exaudio_parse fell back to legacy G711U, bypassing on_media_cb Opus deny lists.
  • Fix: Treat ambiguous enhanced-audio headers (IsExHeader bit + printable unrecognized FourCC slot) as unknown codec identity (None) so media_allowed denies the frame.

Tests

  • Regression tests for all three paths in src/session/conn.rs.

Closes #249, #250, #251.

Open in Web View Automation 

…dio codec masquerade

- Treat on_connect_cb and on_shared_object_cb as implicit auth hooks so
  publish/play require explicit on_publish_cb/on_play_cb when configured
- Reject ambiguous enhanced-audio headers (IsExHeader bit with printable
  but unrecognized FourCC) instead of falling back to legacy SoundFormat
- Add regression tests for all three paths

Co-authored-by: Alexander Wagner <info@alexanderwagnerdev.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish/play bypass authorization when server configures only on_connect_cb

1 participant