The pickle module documentation makes confusing statements about secure alternatives
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Documentation
The pickle module states that the xmlrpc marshaling API should be used if the users desire a safe alternative to unpickling untrusted data:
https://docs.python.org/3.14/library/pickle.html:
As our examples shows, you have to be careful with what you allow to be unpickled. Therefore if security is a concern, you may want to consider alternatives such as the marshalling API in xmlrpc.client or third-party solutions.
However, the xmlrpc module has right at the top a warning that says the following:
https://docs.python.org/3.14/library/xmlrpc.client.html#module-xmlrpc.client:
The xmlrpc.client module is not secure against maliciously constructed data. If you need to parse untrusted or unauthenticated data see XML vulnerabilities.
These two statements contradict each other and could lead users to falsely believe that they are using a safe alternative.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the pickle module documentation statement about xmlrpc.client and compare it with the security warning at the top of the xmlrpc.client documentation. Revise the conflicting guidance so users are not led to treat xmlrpc.client as safe for untrusted data; the work is done when the two pages give consistent security advice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, security
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100