Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security Concern: Usage of pickle for Model Loading #400

Open
FlyingFathead opened this issue Jun 3, 2024 · 0 comments
Open

Security Concern: Usage of pickle for Model Loading #400

FlyingFathead opened this issue Jun 3, 2024 · 0 comments

Comments

@FlyingFathead
Copy link

I recently started using pyAudioAnalysis for a project and noticed that the package uses Python's pickle module for loading models (specifically in audioSegmentation.py and audioTrainTest.py). Given the inherent security risks associated with pickle, I wanted to raise a concern.

Issues:

  • pickle is known to be insecure when loading data from untrusted sources. It can execute arbitrary code during the unpickling process, posing a significant security risk.
  • For widely used libraries like pyAudioAnalysis, ensuring safe model loading is crucial to protect users from potential vulnerabilities.

Suggestions:

  • Replace pickle: Consider replacing pickle with a safer alternative like joblib or json for model serialization and deserialization.
  • Documentation: In the interim, clearly document the security risks associated with using pickle and advise users to handle model files from trusted sources only.

I appreciate the work that has gone into developing pyAudioAnalysis and hope this feedback helps in making it even more robust and secure.

Thank you for your consideration.

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

No branches or pull requests

1 participant