Skip to main content

Top 5 Rust Vulnerabilities Created with AI

·563 words·3 mins·
Fernando Guisso
Author
Fernando Guisso
Sharing and learning, hack the planet!

This week I’ve been organizing a secure development workshop — a common activity in the day-to-day life of AppSec. The idea is simple: bring hands-on exercises with real-world vulnerabilities so developers can learn how to avoid these problems in their code.

One of the languages we use at work is Rust, and honestly, I don’t have much experience with it yet. So I started manually researching and studying the most common vulnerabilities in Rust applications.

And it was much harder than I expected.

The challenge of finding Rust-specific vulnerabilities
#

There’s no OWASP Top 10 specifically for Rust yet, and security content for the language is still pretty scattered. I found a few articles trying to apply the “general” OWASP Top 10 to Rust, but that’s not really helpful. Each language has its own nuances — and often, what’s a critical vulnerability in one doesn’t even apply to another. Rust’s compiler, for example, eliminates entire classes of bugs that are common in C and C++.

But that doesn’t mean Rust is immune to vulnerabilities.

AI to the rescue
#

After collecting a bunch of articles, links, and PDFs, I realized I had a pile of information that was hard to digest. So I used NotebookLM Pro — a Google tool that lets you create an assistant based on your own documents.

I threw in all the links I collected, including the RustSec security advisory list, and started chatting with the tool. The result was great: it helped me structure a Top 5 of common Rust vulnerabilities, especially in web applications.

So here’s a summary of what I found — and what I’ll use as the foundation for our workshop.

Top 5 Common Rust Vulnerabilities
#

1. Denial of Service (DoS) through unlimited resource usage or panic
#

Rust doesn’t prevent DoS attacks via massive or deeply nested inputs:

2. Unsoundness in unsafe code or library abstractions
#

unsafe blocks and poorly designed abstractions can break Rust’s safety guarantees:

3. Inadequate input validation
#

Even without memory safety issues, logic flaws can lead to attacks such as:

4. Supply chain vulnerabilities
#

Third-party crates introduce significant risks:

5. Exposure of sensitive data and insecure crypto
#

Issues in this area can lead to major data leaks:

Conclusion
#

Even though Rust offers strong memory safety guarantees, it doesn’t eliminate logic, crypto, or supply chain problems. Security is still the developer’s responsibility — and requires constant auditing of dependencies.

This Top 5 will be the starting point for our upcoming workshop. If you want to join or discuss it further, hit me up!