(0Day) PyTorch Foundation PyTorch AOTIModelPackageLoader Command Injection Remote Code Execution Vulnerability
The AOTIModelPackageLoader in PyTorch fails to validate a user-supplied string before passing it to a system call, allowing command injection. An attacker who can supply that input could run arbitrary code with the privileges of the current user.
This vulnerability allows remote attackers to execute arbitrary code on affected installations of PyTorch. Interaction with this library is required to exploit this vulnerability but attack vectors may vary depending on the implementation.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the loader passes an unvalidated user-supplied string into a shell or system call, so shell metacharacters in that string are interpreted as commands.
Impact
An attacker could execute arbitrary code in the context of the current user, though exploitation requires interaction with the library and the attack vector may vary by implementation.
What the attacker needed
Ability to supply input to the loader; interaction with the library
The fix
The vendor rejected the report as expected behaviour, so the text offers no fix beyond restricting interaction with the product.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program builds a command for the operating system out of text it was given, and does not check that text carefully, someone can slip in extra commands. Here the model-loading part of PyTorch does exactly that, so crafted input can make the computer run the attacker's commands. The result is that the attacker's code runs as whoever started the program.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.