POSIX wordexp(3) can execute commands—even when used for simple expansion
Do not pass untrusted input to wordexp(3): shell-style expansion includes command substitution by default, and WRDE_NOCMD may not reliably block every shell-accepted form on implementations that delegate to a shell.
The author specifically notes bypass concerns in musl and macOS libc, so the warning is broader than merely remembering a flag. The one-comment Lobsters thread questioned why libc needs this shell-like API at all and noted that tilde expansion can be implemented more simply.