Skip to content

Security: add explicit runtime warning for PickleSerializer#3809

Open
RinZ27 wants to merge 1 commit intoPylons:mainfrom
RinZ27:hardening-pickle-serializer
Open

Security: add explicit runtime warning for PickleSerializer#3809
RinZ27 wants to merge 1 commit intoPylons:mainfrom
RinZ27:hardening-pickle-serializer

Conversation

@RinZ27
Copy link
Copy Markdown

@RinZ27 RinZ27 commented Mar 4, 2026

Explicit runtime warnings in PickleSerializer.loads now highlight the inherent security risks of the pickle protocol. While version 2.0 already deprecated this class in favor of JSONSerializer, providing a visible warning during execution ensures that developers maintain awareness of potential RCE vulnerabilities in legacy session configurations. During my analysis of the session logic, it became clear that a silent deprecation might not be enough for production environments still relying on old serialized data.

Documentation for this change has been added to CHANGES.rst under the "Backward Incompatibilities" section. This ensures that users upgrading to the latest version are fully informed of the new warning behavior. Verification was performed to ensure the warning triggers correctly during deserialization without disrupting the application flow, which I believe provides a safer path toward total removal of the serializer in future major releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant