CVE-2024-41945
The fuels-ts typescript SDK has no awareness of to-be-spent transactions
fuels-ts is a library for interacting with Fuel v2. The typescript SDK has no awareness of to-be-spent transactions causing some transactions to fail or silently get pruned as they are funded with already used UTXOs. The problem occurs, because the fund function in fuels-ts/packages/account/src/account.ts gets the needed ressources statelessly with the function getResourcesToSpend without taking into consideration already used UTXOs. This issue will lead to unexpected SDK behaviour, such as a transaction not getting included in the txpool / in a block or a previous transaction silently getting removed from the txpool and replaced with a new one.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
3.1
The fuels-ts typescript SDK has no awareness of to-be-spent transactions
fuels-ts is a library for interacting with Fuel v2. The typescript SDK has no awareness of to-be-spent transactions causing some transactions to fail or silently get pruned as they are funded with already used UTXOs. The problem occurs, because the fund function in fuels-ts/packages/account/src/account.ts gets the needed ressources statelessly with the function getResourcesToSpend without taking into consideration already used UTXOs. This issue will lead to unexpected SDK behaviour, such as a transaction not getting included in the txpool / in a block or a previous transaction silently getting removed from the txpool and replaced with a new one.
- Record
CVE-2024-41945- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
EUVDEUVD-2024-2237
3.1
fuels-ts is a library for interacting with Fuel v2. The typescript SDK has no awareness of to-be-spent transactions causing some transactions to fail or silently get pruned as they are funded with already used UTXOs. The problem occurs, because the fund function in fuels-ts/packages/account/src/account.ts gets the needed ressources statelessly with the function getResourcesToSpend without taking into consideration already used UTXOs. This issue will lead to unexpected SDK behaviour, such as a transaction not getting included in the txpool / in a block or a previous transaction silently getting removed from the txpool and replaced with a new one.
- Record
EUVD-2024-2237- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-3jcg-vx7f-j6qf
2.3
The fuels-ts typescript SDK has no awareness of to-be-spent transactions
Brief/Intro
The typescript SDK has no awareness of to-be-spent transactions causing some transactions to fail or silently get pruned as they are funded with already used UTXOs.
The Typescript SDK provides the fund function which retrieves UTXOs, which belong to the owner and can be used to fund the request in question, from fuel's graphql api. These then get added to the request making it possible to send it to the network as it now has inputs which can be spent by its outputs. Now this works when a user only wants to fund one transaction per block as in the next block, the spent UTXO will not exist anymore. However if a user wants to fund multiple transactions within one block, the following can happen:
It is important to note, that the graphql API will return a random UTXO which has enough value to fund the transaction in question.
- user has 2 spendable
UTXOsin their wallet which can cover all expenses - user funds transaction
tAwith an input gotten from the APIiA - user submits
tAto fuel iAis still in possession of the user as no new block has been produced- user funds a transaction
tBand gets the same inputiAfrom the API - user tries to submit transaction
tBto fuel but now one of the following can happen:- if the recipient and all other parameters are the same as in
tA, submission will fail astBwill have the sametxHashastA - if the parameters are different, there will be a collision in the
txpoolandtAwill be removed from thetxpool
- if the recipient and all other parameters are the same as in
Vulnerability Details
The problem occurs, because the fund function in fuels-ts/packages/account/src/account.ts gets the needed ressources statelessly with the function getResourcesToSpend without taking into consideration already used UTXOs:
async fund<T extends TransactionRequest>(request: T, params: EstimatedTxParams): Promise<T> {
// [...]
let missingQuantities: CoinQuantity[] = [];
Object.entries(quantitiesDict).forEach(([assetId, { owned, required }]) => {
if (owned.lt(required)) {
missingQuantities.push({
assetId,
amount: required.sub(owned),
});
}
});
let needsToBeFunded = missingQuantities.length > 0;
let fundingAttempts = 0;
while (needsToBeFunded && fundingAttempts < MAX_FUNDING_ATTEMPTS) {
const resources = await this.getResourcesToSpend(
missingQuantities,
cacheRequestInputsResourcesFromOwner(request.inputs, this.address)
); // @audit-issue here we do not exclude ids we already got and used for another transaction in the current block
request.addResources(resources);
// [...]
}
// [...]
return request;
}
Impact Details
This issue will lead to unexpected SDK behaviour. Looking at the scenario in Brief/Intro, it could have the following impacts for users:
- A transaction does not get included in the
txpool/ in a block - A previous transaction silently gets removed from the
txpooland replaced with a new one
Recommendation
I would recommend adding a buffer to the Account class, in which retrieved resources are saved. These can then be provided to getResourcesToSpend to be excluded from future queries but need to be removed from the buffer if their respective transaction fails to be included, in order to be able to use those resources again in such cases.
Proof of Concept
The following PoC transfers 100 coins from wallet2 to wallet after which wallet2 has two UTXOs one with value 100 and one with a very high value (this is printed to the console). Afterwards, wallet will attempt transfering 80 coins back to wallet2 twice in one block, each in a separate transaction. This should work perfectly fine as wallet has two UTXOs where each can cover the cost of each respective transaction. Now when running this one of the following will happen:
- both transfers from
wallettowallet2get a differentUTXO. This is…
- Record
GHSA-3jcg-vx7f-j6qf- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
NVD
3.1
fuels-ts is a library for interacting with Fuel v2. The typescript SDK has no awareness of to-be-spent transactions causing some transactions to fail or silently get pruned as they are funded with already used UTXOs. The problem occurs, because the fund function in fuels-ts/packages/account/src/account.ts gets the needed ressources statelessly with the function getResourcesToSpend without taking into consideration already used UTXOs. This issue will lead to unexpected SDK behaviour, such as a transaction not getting included in the txpool / in a block or a previous transaction silently getting removed from the txpool and replaced with a new one.
- Record
CVE-2024-41945- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
OSV
3.1
The fuels-ts typescript SDK has no awareness of to-be-spent transactions
fuels-ts is a library for interacting with Fuel v2. The typescript SDK has no awareness of to-be-spent transactions causing some transactions to fail or silently get pruned as they are funded with already used UTXOs. The problem occurs, because the fund function in fuels-ts/packages/account/src/account.ts gets the needed ressources statelessly with the function getResourcesToSpend without taking into consideration already used UTXOs. This issue will lead to unexpected SDK behaviour, such as a transaction not getting included in the txpool / in a block or a previous transaction silently getting removed from the txpool and replaced with a new one.
- Record
CVE-2024-41945- CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
OSVGHSA-3jcg-vx7f-j6qf
2.3
The fuels-ts typescript SDK has no awareness of to-be-spent transactions
Brief/Intro
The typescript SDK has no awareness of to-be-spent transactions causing some transactions to fail or silently get pruned as they are funded with already used UTXOs.
The Typescript SDK provides the fund function which retrieves UTXOs, which belong to the owner and can be used to fund the request in question, from fuel's graphql api. These then get added to the request making it possible to send it to the network as it now has inputs which can be spent by its outputs. Now this works when a user only wants to fund one transaction per block as in the next block, the spent UTXO will not exist anymore. However if a user wants to fund multiple transactions within one block, the following can happen:
It is important to note, that the graphql API will return a random UTXO which has enough value to fund the transaction in question.
- user has 2 spendable
UTXOsin their wallet which can cover all expenses - user funds transaction
tAwith an input gotten from the APIiA - user submits
tAto fuel iAis still in possession of the user as no new block has been produced- user funds a transaction
tBand gets the same inputiAfrom the API - user tries to submit transaction
tBto fuel but now one of the following can happen:- if the recipient and all other parameters are the same as in
tA, submission will fail astBwill have the sametxHashastA - if the parameters are different, there will be a collision in the
txpoolandtAwill be removed from thetxpool
- if the recipient and all other parameters are the same as in
Vulnerability Details
The problem occurs, because the fund function in fuels-ts/packages/account/src/account.ts gets the needed ressources statelessly with the function getResourcesToSpend without taking into consideration already used UTXOs:
async fund<T extends TransactionRequest>(request: T, params: EstimatedTxParams): Promise<T> {
// [...]
let missingQuantities: CoinQuantity[] = [];
Object.entries(quantitiesDict).forEach(([assetId, { owned, required }]) => {
if (owned.lt(required)) {
missingQuantities.push({
assetId,
amount: required.sub(owned),
});
}
});
let needsToBeFunded = missingQuantities.length > 0;
let fundingAttempts = 0;
while (needsToBeFunded && fundingAttempts < MAX_FUNDING_ATTEMPTS) {
const resources = await this.getResourcesToSpend(
missingQuantities,
cacheRequestInputsResourcesFromOwner(request.inputs, this.address)
); // @audit-issue here we do not exclude ids we already got and used for another transaction in the current block
request.addResources(resources);
// [...]
}
// [...]
return request;
}
Impact Details
This issue will lead to unexpected SDK behaviour. Looking at the scenario in Brief/Intro, it could have the following impacts for users:
- A transaction does not get included in the
txpool/ in a block - A previous transaction silently gets removed from the
txpooland replaced with a new one
Recommendation
I would recommend adding a buffer to the Account class, in which retrieved resources are saved. These can then be provided to getResourcesToSpend to be excluded from future queries but need to be removed from the buffer if their respective transaction fails to be included, in order to be able to use those resources again in such cases.
Proof of Concept
The following PoC transfers 100 coins from wallet2 to wallet after which wallet2 has two UTXOs one with value 100 and one with a very high value (this is printed to the console). Afterwards, wallet will attempt transfering 80 coins back to wallet2 twice in one block, each in a separate transaction. This should work perfectly fine as wallet has two UTXOs where each can cover the cost of each respective transaction. Now when running this one of the following will happen:
- both transfers from
wallettowallet2get a differentUTXO. This is…
- Record
GHSA-3jcg-vx7f-j6qf- CVSS 4.0
- 2.3 Low
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 3.1 Low
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N - Weakness
- CWE-20
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@fuel-ts/accountnpm |
before 0.93.0 | 0.93.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-41945 is a low vulnerability (CVSS 3.1) in Fuellabs Fuels-ts, published July 30, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.31%, the 23rd percentile. Fixed in @fuel-ts/account 0.93.0.
References
github.com/FuelLabs/fuels-ts/security/advisories/GHSA-3jcg-vx7f-j6qf
github.com/FuelLabs/fuels-ts/commit/16ee1bfe66733551d00f0a76c21e8a09ea33006f
nvd.nist.gov/vuln/detail/CVE-2024-41945
github.com/advisories/GHSA-3jcg-vx7f-j6qf
github.com/CVEProject/cvelistV5/tree/main/cves/2024/41xxx/CVE-2024-41945.json
github.com/FuelLabs/fuels-ts
Left out here: the rest of 2 source descriptions. The JSON record has them.