Skip to content

Harden pickle unpickler in webbrute_shortnames#3200

Merged
liquidsec merged 2 commits into
devfrom
harden-shortnames-pickle
Jun 17, 2026
Merged

Harden pickle unpickler in webbrute_shortnames#3200
liquidsec merged 2 commits into
devfrom
harden-shortnames-pickle

Conversation

@liquidsec

Copy link
Copy Markdown
Collaborator

Summary

  • CustomUnpickler.find_class in webbrute_shortnames falls through to super().find_class() for any class other than MinimalWordPredictor, allowing arbitrary class instantiation from a malicious pickle payload (supply-chain risk if the upstream model files are compromised)
  • Fix: raise pickle.UnpicklingError instead of falling through

Restrict CustomUnpickler.find_class to only allow
MinimalWordPredictor instead of falling through to the
default find_class, which permits arbitrary class
instantiation.
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

🚀 Performance Benchmark Report

⚠️ No current benchmark data available

This might be because:

  • Benchmarks failed to run
  • No benchmark tests found
  • Dependencies missing

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90%. Comparing base (9cc4809) to head (ed9f6a4).
⚠️ Report is 27 commits behind head on dev.

Files with missing lines Patch % Lines
bbot/modules/webbrute_shortnames.py 67% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##             dev   #3200   +/-   ##
=====================================
- Coverage     90%     90%   -0%     
=====================================
  Files        453     453           
  Lines      46024   46026    +2     
=====================================
- Hits       41154   41147    -7     
- Misses      4870    4879    +9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@liquidsec liquidsec merged commit 24e956a into dev Jun 17, 2026
15 checks passed
@liquidsec liquidsec deleted the harden-shortnames-pickle branch June 17, 2026 04:08
@ausmaster ausmaster added this to the BBOT 3.0 - blazed_elijah milestone Jun 23, 2026
@liquidsec liquidsec mentioned this pull request Jul 7, 2026
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.

2 participants