Update dependency web3-utils to v4 [SECURITY] - autoclosed #194
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.3.0
->^4.0.0
web3-utils Prototype Pollution vulnerability
CVE-2024-21505 / GHSA-87qp-7cw8-8q9c
More information
Details
Versions of the package web3-utils before 4.2.1 are vulnerable to Prototype Pollution via the utility functions format and mergeDeep, due to insecure recursive merge.
An attacker can manipulate an object's prototype, potentially leading to the alteration of the behavior of all objects inheriting from the affected prototype by passing specially crafted input to these functions.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
ChainSafe/web3.js (web3-utils)
v4.2.1
Compare Source
Fixed
web3-eth-abi
ERR_UNSUPPORTED_DIR_IMPORT
in ABI (#6535)Changed
web3-eth-contract
web3-eth
web3-eth-ens
web3-eth-personal
v4.2.0
Compare Source
Added
web3
web3-eth
ALL_EVENTS
andALL_EVENTS_ABI
constants,SendTransactionEventsBase
type,decodeEventABI
method (#6410)web3-eth-accounts
privateKeyToPublicKey
BaseTransaction
from the package (#6493)txUtils
from the package (#6493)web3-types
EventLog
was added. (#6410)web3-utils
EventEmitter
has been implemented and exported. (#6398)Fixed
web3-core
web3-errors
web3-eth
checkRevertBeforeSending
insendSignedTransaction
defaultTransactionBuilder
for value issue (#6509)web3-eth-abi
web3-eth-accounts
recover
function,v
will be normalized to value 0,1 (#6344)web3-providers-http
web3-providers-ipc
web3-providers-ws
web3-utils
web3-validator
convertToZod
method (#6434)Changed
web3
web3-core
EventEmitter
fromweb3-utils
that works in node envrioment as well as in the browser. (#6398)web3-eth
web3-eth-contract
events
property was added to thereceipt
object (#6410)web3-eth-ens
web3-eth-iban
web3-eth-personal
web3-net
web3-providers-http
web3-rpc-methods
v4.1.1
Compare Source
Added
web3
web3-core
web3-eth-contract
Fixed
web3-eth
formatSubscriptionResult
in classNewHeadsSubscription
(#6368)web3-core
send
method on request manager (#6300).web3-errors
web3-eth-contract
contract.events.allEvents
web3-validator
Changed
web3-eth-abi
web3-eth-accounts
web3-eth-ens
web3-eth-iban
web3-eth-personal
web3-net
web3-providers-http
web3-providers-ipc
web3-providers-ws
web3-rpc-methods
web3-types
web3-utils
v4.1.0
Compare Source
Added
web3
web3-core
web3-errors
RpcErrorMessages
that contains mapping for standard RPC Errors and their messages. (#6230)TransactionGasMismatchInnerError
for clarity on the error inTransactionGasMismatchError
(#6215)MissingGasInnerError
for clarity on the error inMissingGasError
(#6215)web3-eth
rpc_method_wrapper
(signTypedData
) for the rpc callseth_signTypedData
andeth_signTypedData_v4
(#6286)signTypedData
method to theWeb3Eth
class (#6286)web3-eth-abi
getEncodedEip712Data
method that takes an EIP-712 typed data object and returns the encoded data with the option to also keccak256 hash it (#6286)web3-rpc-methods
signTypedData
method toeth_rpc_methods
for the rpc callseth_signTypedData
andeth_signTypedData_v4
(#6286)web3-types
eth_signTypedData
andeth_signTypedData_v4
toweb3_eth_execution_api
(#6286)Eip712TypeDetails
andEip712TypedData
toeth_types
(#6286)web3-validator
json-schema
as a main json schema type (#6264)Fixed
web3-core
web3-errors
web3-eth
estimateGas
unless transaction builderoptions.fillGas
is false. (#6249)blockHeaderSchema
properties causing some properties to not appear in response ofnewHeads
subscription (#6243)blockHeaderSchema
properties causing some properties to not appear in response ofnewHeads
subscription (#6243)web3-providers-ws
Changed
web3-core
CommonSubscriptionEvents &
at every child class ofWeb3Subscription
(#6262)_processSubscriptionResult
and_processSubscriptionError
has been written in the base classWeb3Subscription
and maidpublic
. (#6262)formatSubscriptionResult
could be used to customize data formatting instead of re-implementing_processSubscriptionResult
. (#6262)CommonSubscriptionEvents &
for the first generic parameter ofWeb3Subscription
when inheriting from it. (#6262)web3-eth
MissingGasError
error message changed for clarity (#6215)input
anddata
are no longer auto populated for transaction objects if they are not present. Instead, whichever property is provided by the user is formatted and sent to the RPC provider. Transaction objects returned from RPC responses are still formatted to contain bothinput
anddata
properties (#6294)web3-eth-accounts
web3-eth-contract
web3-eth-ens
web3-eth-iban
web3-eth-personal
web3-net
web3-providers-http
web3-providers-ipc
web3-types
input
anddata
are now optional properties onPopulatedUnsignedBaseTransaction
(previouslyinput
was a required property, anddata
was not available) (#6294)web3-utils
web3-validator
is-my-json-valid
withzod
dependency. Related code was changed (#6264)ValidationError
andJsonSchema
were changed (#6264)Removed
web3-eth
blockHeaderSchema
properties causing some properties to not appear in response ofnewHeads
subscription (#6243)RawValidationError
was removed (#6264)web3-validator
RawValidationError
was removed (#6264)v4.0.7
Compare Source
v4.0.6
Compare Source
v4.0.5
Compare Source
v4.0.4
Compare Source
v4.0.3
Compare Source
Fixed
web3
web3-rpc-methods
getPastLogs
accept blockHash as a parameter https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs (#6181)web3-types
Filter
includesblockHash
(#6206)web3-utils
numberToHex
(#6206)Changed
web3-core
web3-errors
web3-eth
web3-eth-abi
web3-eth-accounts
web3-eth-contract
web3-eth-ens
web3-eth-iban
web3-eth-personal
web3-net
web3-providers-http
web3-providers-ipc
web3-providers-ws
web3-validator
v4.0.2
Compare Source
Fixed
web3
web3-core
web3-eth-abi
web3-eth-accounts
r
ands
returned bysignTransaction
to does not always consist of 64 characters #6207" (#6216)web3-eth-contract
web3-eth-ens
web3-providers-ws
web3-types
Added
web3
Web3Context
,Web3PluginBase
,Web3EthPluginBase
from'web3-core'
, andWeb3Validator
from'web3-validator'
(#6165)web3-core
web3-types
SimpleProvider
interface which has onlyrequest(args)
method that is compatible with EIP-1193 (#6210)Eip1193EventName
type that contains the possible events names according to EIP-1193 (#6210)Changed
web3-core
web3-errors
web3-eth
web3-eth-iban
web3-eth-personal
web3-net
web3-providers-http
web3-providers-ipc
web3-rpc-methods
web3-types
EIP1193Provider
class has now all the events (foron
andremoveListener
) according to EIP-1193 (#6210)web3-utils
web3-validator
v4.0.1
Fixed
v4.0.0
Note: Yarn is resolving to some old deprecated package versions for 4.0.0-alpha.0 instead of latest alpha versions. A patch bump is posted so yarn users
should use 4.0.1-alpha.0 for testing.
Added
web3-errors
web3-errors
new package is created, it has Web3 Error codes and classesweb3-types
web3-types
new package is created, it provides the common data structures and interfaces for web3 modulesweb3-validator
web3-validator
new package is created, it has JSON-Schema compatible validator functionality for Web3Removed
web3-bzz
web3-shh
web3-core-helpers
errors
are moved toweb3-errors
package and formatters are moved inweb3-core
packageweb3-core-method
web3-core-method
functionality is moved toweb3-eth
packageweb3-core-promieevent
web3-core
packageweb3-core-requestmanager
web3-core
packageweb3-core-subscription
web3-core
packageChanged
web3
extend
is deprecatedweb3-core
outputBigNumberFormatter
inweb3-core-helper
renamed tooutputBigIntFormatter
underweb3-core
this.defaultBlock
context frominputDefaultBlockNumberFormatter
inweb3-core-helper
and converted to additional parameterthis.defaultBlock
context frominputTransactionFormatter
inweb3-core-helper
and converted to additional parameterweb3-utils
soliditySha3
soliditySha3Raw
encodePacked
now includes type validation and requires type specification, instead of guessing the value typesoliditySha3
,soliditySha3Raw
andencodePacked
did not support BN; But, now supportsBigInt
flattenTypes
andjsonInterfaceMethodToString
moved to theweb3-eth-abi
packageisAddress
now includes an optional parametercheckChecksum
type booleanisBoolean
now accept1
, and0
as valid values to test. Ref:web3-validator
web3-eth-accounts
create
function does not take in the optional parameterentropy
Wallet.create
function doesn't acceptentropy
paramweb3-validator
isBoolean
now accept1
, and0
as valid values to test.web3-eth-contract
signTransaction
will not fill any default values, and it will only sign and return result. For filling default values, useweb3-eth
packagerecover
function's last param is booleanhashed
, it is used to indicate if data provided is already hashed or not. By default, this function will assume data is not hashed.Wallet
no longer supports address/number indexing. Have to usewallet.get
instead.Wallet.create
function doesn't acceptentropy
paramcontract.method.send()
will resolve to transaction receipt instead oftransactionHash
. User can usereceipt.transactionHash
instead.web3-net
web3-eth-iban
isDirect
,isValid
,isIndirect
are now also included as static methods.web3-eth-ens
setMultihash
is not supported in web3-eth-ens 4.x as it's deprecated in ENS public resolver (https://github.com/ensdomains/resolvers/blob/master/contracts/PublicResolver.sol)setContent
is not supported in web3-eth-ens 4.x as it's deprecated in ENS public resolver (https://github.com/ensdomains/resolvers/blob/master/contracts/PublicResolver.sol)getContent
is not supported in web3-eth-ens 4.x as it's deprecated in ENS public resolver.getMultihash
is not supported in web3-eth-ens 4.x as it's deprecated in ENS public resolver.web3-eth-abi
internalType
was renamed tobaseType
in all abi typesweb3-eth
givenProvider
default value is undefineddefaultHardfork
default value is 'london'defaultAccount
default value is undefineddefaultNetworkId
default value is undefinedtransactionSendTimeout
, throw an Error.web3-eth-subscribe
clearSubscriptions
Instead of returningtrue
,clearSubscriptions
now returns array of subscription's idsweb3-eth-personal
givenProvider
default value is undefinedcurrentProvider
default value is undefinedv1.10.4
Compare Source
Security
Maintenance Countdown:
Commencing from January 1, 2024, a 90-day countdown has been initiated, signaling the transition of Web3.js version 1.x into an end-of-maintenance phase.
Timeline of Changes:
90-Day Countdown (1/1/24 - 3/31/24): During this period, we strongly encourage users to plan accordingly and initiate the upgrade to Web3.js version 4.x
No New Bug Fixes (4/1/24 onwards):
Starting April 1, 2024, new bug fixes for Web3.js version 1.x will no longer be provided. To benefit from continued support and access to new features, we recommend upgrading to Web3.js version 4.x
End of Security Fixes (7/1/24):
Security fixes for Web3.js version 1.x will be discontinued from July 1, 2024. Upgrading to Web3.js version 4.x is crucial to ensure the security of your applications.
v1.10.3
Compare Source
Security
web3-eth-accounts
: Bumped@ethereumjs
dependencies (#6457)Updated dependencies (#6491)
v1.10.2
Compare Source
Fixed
v1.10.1
Compare Source
Fixed
int
s (#6239)submitWork
parameters, accepts 3 parameters instead of an array (#5200)Changed
v1.10.0
Compare Source
Fixed
web3-providers-http
package to effectively propagate useful error infomation about failed HTTP connections (#5955)web.eth.handleRevert = true
(#6000)Changed
transaction.type
is now formatted to a hex string before being send to provider (#5979)transaction.type === '0x1' && transaction.accessList === undefined
, thentransaction.accessList
is set to[]
(#5979)chainId
parameter fromtoChecksumAddress()
function types (#5888)Added
getPastEvents
method to filterallEvents
and specific event (#6015)Security
v1.9.0
Compare Source
Fixed
Changed
hexFormat
param togetTransaction
andgetBlock
that accepts the value'hex'
(#5845)utils.toNumber
andutils.hexToNumber
can now return the large unsafe numbers asBigInt
, iftrue
was passed to a new optional parameter calledbigIntOnOverflow
(#5845)Security
v1.8.2
Compare Source
Changed
crypto-browserify
module is now used only in webpack builds for polyfilling browsers (#5629)ethereumjs-util
to7.1.5
(#5629)lerna
4 to version 6 (#5680)Fixed
web3.utils._jsonInterfaceMethodToString
(#5550)Removed
clean-webpack-plugin
has been removed from dev-dependencies (#5629)Added
https-browserify
,process
,stream-browserify
,stream-http
,crypto-browserify
added to dev-dependencies for polyfilling (#5629)readable-stream
to dev-dependancies for webpack (#5629)Security
npm audit fix
for libraries update (#5726)v1.8.1
Compare Source
Fixed
removed
property (#4877)Changed
v1.8.0
Compare Source
Changed
sha3
andsha3Raw
type definition to acceptBuffer
(#5357)eth_sendSignedTransaction
code example (#5402)Fixed
web3-eth-contract
'scall
andsend
methods no longer mutateoptions
argument (#5394)Added
AbiType
(#5165)safe
andfinalized
block tags added (#5410)v1.7.5
Compare Source
Changed
Added
maxFeePerGas
andmaxPriorityFeePerGas
(#5121)createAccessList
types in web3.eth (#5146)Fixed
AbstractProvider
interface (#5150)Security
got
lib version and fixed other libs using npm audit fix (#5178) (#5254)v1.7.4
Compare Source
Fixed
f.call = this.call
when intrinsic is frozen (#4918) (#4938)Changed
Added
web3.eth.Contract.setProvider()
as per public documentation (#4822) (#5001)Security
npm audit fix
to address vulnerabilities and update libraries (#5014)v1.7.3
Compare Source
Fixed
v1.7.2
Compare Source
Changed
close
event listener (#4825) (#4839)Security
npm audit fix
to update libraries (#4860)Fixed
provider.disconnect
function (#4833)v1.7.1
Compare Source
Added
transactionPollingInterval
added to web3, contract and method constructor options. defaults to 1 second. (#4584)Fixed
methods.myMethod.send
(#4599)web3.eth.accounts.signTransaction
(#4576)methods.myMethod.estimateGas
(#4702)Changed
Removed
Security
npm audit fix
to address vulnerabilities and update libraries (#4719) (#4728)Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.