HexBrain

Node.js · Report #2237545

Code injection and privilege escalation through Linux capabilities

Validstatus
highseverity
23upvotes
15 Feb 2024disclosed

Summary

On Linux, Node.js ignores certain environment variables if those may have been set by an unprivileged user while the process is running with elevated privileges with the only exception of CAP_NET_BIND_SERVICE.

Due to a bug in the implementation of this exception, Node.js incorrectly applies this exception even when certain other capabilities have been set.

This allows unprivileged users to inject code that inherits the process's elevated privileges.

How it was found

The write-up for this report has not been downloaded yet, or the program disclosed it without one. Read it on HackerOne.

This report was disclosed publicly on HackerOne and belongs to its author and the program. See the original