Skip to content

v5.0.4 - Security Enhancement Release

Choose a tag to compare

@w4ffl35 w4ffl35 released this 03 Dec 17:08
· 8322 commits to master since this release
9e41e82

Security Enhancements

This release addresses critical security gaps in the facehuggershield sandbox suite that protects against malicious code in Hugging Face models.

Fixed

  • Network restrictions not being activated: The darklock.activate() function was not calling network.activate(), leaving network restrictions unenforced
  • Missing OS function patches: Added restrictions for os.unlink, os.rename, os.replace, os.link, and os.symlink to prevent unauthorized filesystem operations
  • NoInternetSocket bypass: Improved socket blocking to properly handle port=-1 for blocking all connections
  • Network restriction state tracking: Added _activated flag to prevent double activation and ensure proper state management
  • Localhost detection: Enhanced support for multiple localhost formats (127.0.0.1, localhost, ::1)

Security Impact

Users running untrusted Hugging Face models are strongly advised to upgrade. The facehuggershield sandbox now properly enforces both filesystem and network restrictions.

Breaking Changes

None - this is a backward-compatible security patch.