DigiNews

Tech Watch by Johan Denoyer

← Back to articles

POSIX wordexp(3) is dangerous

Quality: 8/10 Relevance: 9/10

Summary

The article explains that wordexp(3) performs shell-style expansions by default, which can lead to command execution when given untrusted input. It demonstrates how to partially mitigate this with WRDE_NOCMD, and reviews implementation pitfalls in musl and macOS libc. It cautions developers to avoid using wordexp(3) on untrusted data and to seek safer alternatives.

🚀 Service construit par Johan Denoyer