Skip to content

fix(security): 2 improvements across 2 files#869

Open
tomaioo wants to merge 2 commits into
CroatianMeteorNetwork:masterfrom
tomaioo:fix/security/insecure-deserialization-via-pickle-load
Open

fix(security): 2 improvements across 2 files#869
tomaioo wants to merge 2 commits into
CroatianMeteorNetwork:masterfrom
tomaioo:fix/security/insecure-deserialization-via-pickle-load

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented May 25, 2026

Summary

fix(security): 2 improvements across 2 files

Problem

Severity: Critical | File: RMS/Pickling.py:L46

The loadPickle function in RMS/Pickling.py uses pickle.load() to deserialize data from arbitrary file paths without any input validation or restrictions. Python's pickle module is not secure against maliciously constructed data. An attacker could craft a malicious pickle file that executes arbitrary code when loaded. The function catches exceptions but still processes untrusted input.

Solution

Replace pickle with a safer serialization format like JSON for untrusted data, or implement strict input validation and consider using pickle only with trusted sources. If pickle must be used, consider using pickle.loads() with a restricted unpickler or add a whitelist of allowed classes.

Changes

  • RMS/Pickling.py (modified)
  • RMS/ImgurUpload.py (modified)

tomaioo added 2 commits May 25, 2026 11:44
- Security: Insecure Deserialization via pickle.load without Restrictions
- Security: Hardcoded API Credentials in Source Code

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
- Security: Insecure Deserialization via pickle.load without Restrictions
- Security: Hardcoded API Credentials in Source Code

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
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