Skip to content

SSE: event/id fields not sanitized against newlines, allows event injection #221

Description

@ZhuchkaTriplesix

Where: oxyroute/sse.py:31-33 (_format_sse_event).

ev.event and ev.id are interpolated directly into event: {ev.event} / id: {ev.id} lines without stripping \n/\r. If either value comes from user input, a newline lets the attacker inject arbitrary extra SSE fields (e.g. a fake data: line) or start a new event, breaking the intended event boundary.

Fix direction: reject or strip \r/\n from event and id the same way data is already split per-line.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions