The vulnerability exists in the _handle_webchat function within astrbot/core/astr_main_agent.py. The code unsafely parses the event.session_id by splitting it with a '!' delimiter and taking the last part as the session identifier. This allows an attacker to inject a victim's session ID into their own, leading to an authorization bypass. Specifically, an attacker can send a session ID in the format attacker_controlled_part!victim_session_id. The code will then incorrectly use victim_session_id for subsequent operations, such as renaming a chat session. The build_main_agent function is the orchestrator that calls _handle_webchat when the platform is 'webchat', making it a key part of the exploitation path. The analysis of the gist and the source code confirms this vulnerability.