Skip to content

Put dangerous use cases behind feature flags #2

@insanitybit

Description

@insanitybit

Hi, just stumbled across this crate. Very cool and flexible, not judging what you've done here.

I do think though that it's a bit scary though.

For example:

“(…)” runs a command with a pipe from the child process’ stdout, on platforms whch support it.

https://docs.rs/nameless/0.7.1/nameless/struct.InputByteStream.html

An attacker who controls a command line argument to a program now has full RCE.

Similarly, with the networking support, the attacker can perform network requests, which is less scary but still pretty spooky.

I would suggest two things.

  1. Put support for different sources and sinks into feature flags and disable the features like command execution by default. I think that users generally don't expect "command line argument can execute arbitrary code" to be the case.
  2. Add a security warning in the repo clarifying that this library is not suitable for cases where untrusted input is provided to the command line.

If I've misunderstood anything about how this crate works feel free to let me know. I just took a quick look and noticed this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions