Security Vulnerability Remediation (Affected Versions: < 10.23.3) #28
eastspire
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Security & Behavior Regression Notice
Under keep-alive connections, the same instance could be reused multiple times, leading to cross-request context state leakage.
The
ctxlifecycle was not fully isolated per request, which is a long-standing design issue rather than one newly introduced by this change.A recent modification further exposed this behavior by causing
ctx.aborted()andctx.closed()to stop working correctly, which broke request interception and lifecycle hooks.Affected code:
https://github.com/hyperlane-dev/hyperlane/blob/a8efce23092098bee023911c30ecd3807225c754/src/server/impl.rs
Impact
ctx.abortedandctx.closedno longer reflected the actual connection statectxinstance could be reused across multiple requests, resulting in cross-request context state leakageFixes
v10.23.1 — Restored
ctx.aborted()behavior and lifecycle interception f5565bav10.23.3 — Ensured
ctxis no longer reused under keep-alive connections, preventing cross-request context state leakage 87f6745Recommendation
Users are strongly advised to upgrade to v10.23.3 or later to ensure correct request isolation and lifecycle handling.
Minimal Reproduction Demo
With the problematic code, when accessing
http://127.0.0.1:80, the console will sequentially output "Middleware1 reached" and "Middleware2 reached".The fact that "Middleware2 reached" is printed is not the expected behavior, because the first middleware should have aborted the subsequent lifecycle processing.
Why This Issue Was Not Detected During Testing
The issue was not identified during the testing phase because the unit test coverage was incomplete. The test cases determined whether a request was successfully sent solely based on the response result, rather than checking the console output.
Before sending a response, the framework performs a real-time interruption state check. As a result, when the context is marked as interrupted, the response is neither processed nor sent, making the anomaly undetectable from the response layer.
Beta Was this translation helpful? Give feedback.
All reactions