Skip to content

fix: gate AMF3 shared object delivery on authorization callback - #225

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/application-security-review-6b89
Draft

fix: gate AMF3 shared object delivery on authorization callback#225
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/application-security-review-6b89

Conversation

@cursor

@cursor cursor Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Security review fix

Fixes #224

Finding (Medium)

Location: src/session/conn.rs

Impact: Any remote peer that completes RTMP connect could send AMF3 Shared Object messages (type 0x10) that reached on_shared_object_cb unconditionally, bypassing on_publish_cb / on_play_cb / on_media_cb deny policies.

Attack path: TCP handshake → connectRTMP_MSG_AMF3_SHARED_OBJECThandle_amf3_shared_object()on_shared_object_cb with no bool-returning authorization gate.

Remediation

  • Add on_shared_object_auth_cb (bool-returning, like on_publish_cb).
  • Drop inbound shared objects when publish/play auth hooks are configured but shared-object auth is unset.
  • Wire the callback through ServerConn.
  • Add regression tests for deny-by-default and explicit auth allow paths.
Open in Web View Automation 

Add on_shared_object_auth_cb so inbound shared-object messages can be
rejected at the protocol layer. When publish/play auth hooks are configured
but no shared-object auth callback is registered, drop shared objects instead
of delivering them to on_shared_object_cb.

Co-authored-by: Alexander Wagner <[email protected]>
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.

AMF3 shared object messages bypass publish/play authorization hooks

1 participant