-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(connector-quorum/ethereum): strengthen contract parameter validation #2760
Labels
good-first-issue
Good for newcomers
good-first-issue-400-expert
Hacktoberfest
Hacktoberfest participants are welcome to take a stab at issues marked with this label.
P2
Priority 2: High
Quorum
Security
Related to existing or potential security vulnerabilities
Milestone
Comments
Good idea, we could use |
hey @petermetz should I give it a try? |
@shivam-Purohit Fine by me, yes! Thank you for your contribution in advance! |
petermetz
pushed a commit
to petermetz/cacti
that referenced
this issue
Jan 3, 2024
Peter's updates: 1. Made improvements to the test case verifying that the parameters with incorrect types are indeed being rejected with useful error messaging 2. Added a new library (which I also had to re-publish with CJS exports) Fixes hyperledger-cacti#2760 Signed-off-by: Shivam Purohit <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
5 tasks
petermetz
pushed a commit
to petermetz/cacti
that referenced
this issue
Jan 9, 2024
Peter's updates: 1. Made improvements to the test case verifying that the parameters with incorrect types are indeed being rejected with useful error messaging 2. Added a new library (which I also had to re-publish with CJS exports) Fixes hyperledger-cacti#2760 Signed-off-by: Shivam Purohit <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]> (cherry picked from commit 407bcf4)
petermetz
pushed a commit
to petermetz/cacti
that referenced
this issue
Jan 24, 2024
Peter's updates: 1. Made improvements to the test case verifying that the parameters with incorrect types are indeed being rejected with useful error messaging 2. Added a new library (which I also had to re-publish with CJS exports) Fixes hyperledger-cacti#2760 Signed-off-by: Shivam Purohit <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]> (cherry picked from commit 407bcf4)
petermetz
pushed a commit
to shivam-Purohit/cacti
that referenced
this issue
Jan 24, 2024
Peter's updates: 1. Made improvements to the test case verifying that the parameters with incorrect types are indeed being rejected with useful error messaging 2. Added a new library (which I also had to re-publish with CJS exports) Fixes hyperledger-cacti#2760 Signed-off-by: Shivam Purohit <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
petermetz
pushed a commit
to petermetz/cacti
that referenced
this issue
Jan 24, 2024
Peter's updates: 1. Made improvements to the test case verifying that the parameters with incorrect types are indeed being rejected with useful error messaging 2. Added a new library (which I also had to re-publish with CJS exports) Fixes hyperledger-cacti#2760 Signed-off-by: Shivam Purohit <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]> (cherry picked from commit 407bcf4)
petermetz
pushed a commit
to petermetz/cacti
that referenced
this issue
Jan 25, 2024
Peter's updates: 1. Made improvements to the test case verifying that the parameters with incorrect types are indeed being rejected with useful error messaging 2. Added a new library (which I also had to re-publish with CJS exports) Fixes hyperledger-cacti#2760 Signed-off-by: Shivam Purohit <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]> (cherry picked from commit 407bcf4)
petermetz
pushed a commit
to shivam-Purohit/cacti
that referenced
this issue
Jan 25, 2024
Peter's updates: 1. Made improvements to the test case verifying that the parameters with incorrect types are indeed being rejected with useful error messaging 2. Added a new library (which I also had to re-publish with CJS exports) Fixes hyperledger-cacti#2760 Signed-off-by: Shivam Purohit <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
petermetz
pushed a commit
that referenced
this issue
Jan 25, 2024
Peter's updates: 1. Made improvements to the test case verifying that the parameters with incorrect types are indeed being rejected with useful error messaging 2. Added a new library (which I also had to re-publish with CJS exports) Fixes #2760 Signed-off-by: Shivam Purohit <[email protected]> Signed-off-by: Peter Somogyvari <[email protected]>
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good-first-issue
Good for newcomers
good-first-issue-400-expert
Hacktoberfest
Hacktoberfest participants are welcome to take a stab at issues marked with this label.
P2
Priority 2: High
Quorum
Security
Related to existing or potential security vulnerabilities
Description
Static source code assessment has picked up a potential code injection vulnerability
in the code of the Quorum and Ethereum connectors where we pass in an array of
user-provided arguments to the EVM contract methods.
Web3JS already has validation on the number of arguments, but we could fortify
things on our end regardless by doing
this information somehow from the ABI)
The report from which the above information was summarized
Risk Rating: High
Category: Injection
Description
The application's ‘invokeRawWeb3EthContract method’ receives and dynamically executes user-controlled code using invocationParams. This could enable an attacker to inject and run arbitrary code. The attacker can inject the executed code via user input, body, which is retrieved by the application in the handleRequest method.
Impact
An attacker could run arbitrary code on the application server host. Depending on the application’s OS permissions,these could include:
Remediation Recommendation
Affected Files
Path
Line No
packages\cactus-plugin-ledger-connector-quorum\src\main\typescript\web-services\invoke-raw-web3eth-contract-v1-endpoint.ts.
packages\cactus-plugin-ledger-connector-quorum\src\main\typescript\plugin-ledger-connector-quorum.ts
packages\cactus-plugin-ledger-connector-ethereum\src\main\typescript\web-services\invoke-raw-web3eth-contract-v1-endpoint.ts.
packages\cactus-plugin-ledger-connector-ethereum\src\main\typescript\plugin-ledger-connector-ethereum.ts.
Snapshot of source code at the time of scan
Source:
APP PE Hyperledger Cacti v2.0.0 - Static Application Assessment Report.odt
cc: @takeutak @izuru0 @outSH
The text was updated successfully, but these errors were encountered: