Under specific conditions (non-default config), an attacker could upload a malicious serialized session file, then trigger deserialization for full RCE — without any authentication.
The patch replaces the dangerous pattern where user-supplied request path was converted to a temp filename by replacing all '/' with '.' — enabling path traversal via internal dot equivalence. The secure fix uses File.createTempFile("put-part-", null, tempDir) for a cryptographically random, attacker-uncontrollable temp filename, plus explicit temp file deletion in a finally block.
The vulnerable code converts the request path to a temp filename via
path.replace('/', '.'), which means/uploads/../../../sessions/SESSION_IDbecomes./uploads/../../../sessions/SESSION_ID— the filename itself encodes the path structure. Combined with file-based session persistence and a deserialization gadget on the classpath, this enables pre-auth RCE with a single crafted PUT request.File.createTempFile()— cryptographically random, attacker-uncontrollable. Plus explicitdelete()in afinallyblock.