Release Notes

๐Ÿ” Security vulnerability ๐Ÿ”

[!WARNING]
This release addresses an unbounded memory allocation denial of service vulnerability (GHSA-m6j5-42w4-55c3) in the /websocket/echo endpoint: A single crafted websocket frame can crash any go-httpbin server, including programs that embed the httpbin package, by declaring a huge payload length that the server will attempt to allocate before checking it against the configured size limits.

The attack needs no authentication and only one small request, and the resulting out-of-memory error kills the whole process rather than just the one connection. Versions v2.13.0 through v2.25.x are affected; upgrade to v2.26.0, which checks frame and message size limits before allocating.

Many thanks to @lucky07072026 for the report, and many apologies from @mccutchen for this "network protocols 101"-level bug!

What's Changed

  • feat: add /image/avif endpoint by @ChrisJr404 in https://github.com/mccutchen/go-httpbin/pull/270
  • middleware: allow QUERY method in CORS preflight by @marr-cloud in https://github.com/mccutchen/go-httpbin/pull/275
  • websocket: enforce frame size limit before allocating frame buffer by @mccutchen in 4d62637fc356b4ae4a4035427b885374f412939a
  • build: update minimium go version to 1.26 by @mccutchen in https://github.com/mccutchen/go-httpbin/pull/276

New Contributors

  • @ChrisJr404 made their first contribution in https://github.com/mccutchen/go-httpbin/pull/270
  • @marr-cloud made their first contribution in https://github.com/mccutchen/go-httpbin/pull/275
  • @lucky07072026 reported GHSA-m6j5-42w4-55c3

Full Changelog: https://github.com/mccutchen/go-httpbin/compare/v2.25.0...v2.26.0