this post was submitted on 10 Feb 2025
31 points (100.0% liked)

Cybersecurity

6447 readers
26 users here now

c/cybersecurity is a community centered on the cybersecurity and information security profession. You can come here to discuss news, post something interesting, or just chat with others.

THE RULES

Instance Rules

Community Rules

If you ask someone to hack your "friends" socials you're just going to get banned so don't do that.

Learn about hacking

Hack the Box

Try Hack Me

Pico Capture the flag

Other security-related communities [email protected] [email protected] [email protected] [email protected] [email protected]

Notable mention to [email protected]

founded 2 years ago
MODERATORS
top 6 comments
sorted by: hot top controversial new old
[–] [email protected] 14 points 3 weeks ago (1 children)

This is a direct quote from the article:

There has been a lot of research pointing out the security risks related to the use of Pickle file serialization (dubbed “Pickling” in the Hugging Face community). In fact, even Hugging Face’s documentation describes the risks of arbitrary code execution in Pickle files in detail.

In other words, there's a known vulnerability, it's documented, it's ignored and now it's been exploited twice.

Wow .. shocked .. is not a word I'd use to describe this situation.

Fuck around and see what happens .. seems more apt.

[–] [email protected] 1 points 3 weeks ago (1 children)
[–] [email protected] 1 points 3 weeks ago

Fair point.

[–] [email protected] 10 points 3 weeks ago

Without reading the article, as a practicing AI Engineer here’s a couple of easy best practices:

  • Use only the .safetensors files, the format is engineered specifically to allow only specific information necessary for NN frameworks
  • Don’t use the ‘trust_remote_code=True’ parameter when serving your models without due consideration of the source of the model.
[–] [email protected] 9 points 3 weeks ago (1 children)

We've known pickle files have been unsafe for like three years at this point and people are still using them?

[–] davitz 7 points 3 weeks ago

Three years? The last time I used pickle was for a school project over a decade ago and even then these vulnerabilities were clearly laid out in the documentation, and it strongly advised against using it for any serious application. The only reason I kept using it in the project is precisely because it was a school project, and I knew the application would never be used in any production context worth attacking. Watching the ML community enthusiastically embrace pickle in the time since has been very amusing to say the least. Honestly I'm surprised it only seems to be catching up to them now.