The project-graph analyzers of the Nx plugins @nx/maven and @nx/gradle start processes through a shell and insert plugin options from nx.json into command arguments without sanitizing them. An attacker who can get a user or CI job to run nx in a hostile repository or pull request can execute arbitrary commands with that user's privileges. Workspaces that do not register either plugin are not exposed.
Nrwl · Nx
The @nx/docker package of the Nx monorepo tool builds Docker tag, image lookup and push commands as shell strings from release configuration values. An attacker who can change the Nx configuration, for example through a pull request, can run arbitrary shell commands during nx release version or nx release publish. These commands run with the privileges of the release job and can expose registry credentials or cloud tokens.
Nrwl · @nx/docker
Nx creates Unix domain sockets for its daemon and plugin workers in shared temporary directories without owner-only permissions. A local, unprivileged account on the same host can connect to these sockets because they perform no authentication. An attacker can then execute code as the account running Nx and read workspace contents, project graphs and task hashes; the risk is limited to shared build servers, CI runners, developer hosts and multi-user containers.
Nrwl · Nx