The vulnerability lies in the deserialization of user-controlled data using Python's pickle module, which is known to be unsafe and can lead to Remote Code Execution (RCE). The provided commit 223f00c3c0533423114f99b30c561278bc0b42ba patches this vulnerability by replacing pickle.loads() with json.loads() in the _decode_preferences method of the Config class in app/models/config.py. The vulnerability description states that an attacker can execute arbitrary code by supplying a crafted search query, which implies that the preferences string processed by _decode_preferences can be influenced by user input. The _decode_preferences function directly handles the deserialization of this potentially malicious string. The patch specifically removes the lines using pickle.loads(brotli.decompress(config)) and config = pickle.loads(brotli.decompress(urlsafe_b64decode(preferences.encode() + b'=='))) which were the points of insecure deserialization.