Weaponizing And Defending The React Flight Protocol: Deserialization Sinks In RSCs

Weaponizing And Defending The React Flight Protocol: Deserialization Sinks In RSCs 图片 1

React Server Components don’t send HTML to your browser. They don’t send JSON either. When a server component renders, what actually travels over the wire is a custom streaming protocol called Flight. It’s a line-delimited format with its own type system, its own reference resolution, and its own rules for reconstructing executable behavior on the client.

Most React developers have never opened the Network tab and actually looked at a Flight payload. It looks like a mix of JSON fragments, dollar-sign-prefixed references, and module pointers that the React runtime silently reassembles into a live component tree. The framework handles it, so nobody questions it.

I’m not sure most teams have thought carefully about what that trust actually implies.

I started pulling apart the Flight proto…

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论