Skip to main content

disable_untrusted_serializers

Disables insecure serializers by restricting the allowed formats to a specified whitelist.

def disable_untrusted_serializers(
whitelist: list[str] = None
) - > null

Disables insecure data serialization formats to prevent remote code execution vulnerabilities. Use this to restrict the application to only safe, whitelisted serializers.

Parameters

NameTypeDescription
whitelistlist[str] = NoneA list of trusted serializer names that should remain enabled, such as 'json' or 'msgpack'.

Returns

TypeDescription
nullNothing is returned; the function modifies the global serialization configuration state.