Innocent cache leading to RCE vulnerability

Recently, I encountered an interesting case of a Remote Code Execution (RCE) vulnerability that was caused by an innocent cache mechanism. We had some code that was invoked in the middleware, before the actual endpoint was invoked. There was a need to save data somewhere that was needed in both the middleware and the actual endpoint logic. This data had only a request lifetime, so saving it in ...