The vulnerability exists in the RestWrite.handleSession function, which is responsible for processing updates to session objects in Parse Server. The core of the issue is an improper validation check on supposedly immutable session fields, specifically expiresAt and createdWith. The original code used a simple truthiness check to determine if a user was attempting to modify these fields. However, this check is insufficient because null is a falsy value in JavaScript. An authenticated attacker could send a PUT request to the session update endpoint with "expiresAt": null. The vulnerable code would evaluate if (null) as false, bypassing the security check and allowing the expiresAt field to be set to null. This effectively removes the session's expiration, allowing it to remain valid indefinitely, thus bypassing session length policies. The provided patches fix this by replacing the flawed truthiness check with a more robust key-presence check ('key' in object), which correctly detects whether the key is present in the request body, regardless of its value. This ensures that any attempt to modify these protected fields is properly rejected.