CWE-1025
AllowedComparison Using Wrong Factors
Abstraction: Base · Status: Incomplete
The code performs a comparison between two entities, but the comparison examines the wrong factors or characteristics of the entities, which can lead to incorrect results and resultant weaknesses.
24 vulnerabilities reference this CWE, most recent first.
GHSA-JMQJ-768C-PW4R
Vulnerability from github – Published: 2025-03-08 00:31 – Updated: 2025-03-08 00:31operations/attestation/AttestationTask.kt in the Tangem SDK before 5.18.3 for Android has a logic flow in offline wallet attestation (genuineness check) that causes verification results to be disregarded during the first scan of a card. Exploitation may not have been possible.
{
"affected": [],
"aliases": [
"CVE-2025-27839"
],
"database_specific": {
"cwe_ids": [
"CWE-1025"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-08T00:15:38Z",
"severity": "LOW"
},
"details": "operations/attestation/AttestationTask.kt in the Tangem SDK before 5.18.3 for Android has a logic flow in offline wallet attestation (genuineness check) that causes verification results to be disregarded during the first scan of a card. Exploitation may not have been possible.",
"id": "GHSA-jmqj-768c-pw4r",
"modified": "2025-03-08T00:31:22Z",
"published": "2025-03-08T00:31:22Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-27839"
},
{
"type": "WEB",
"url": "https://github.com/tangem/tangem-sdk-android/commit/24588188fdb51ed469cd59d2c595128c1fe63b07"
},
{
"type": "WEB",
"url": "https://github.com/tangem/tangem-sdk-android/releases/tag/release-app_5.18-409"
},
{
"type": "WEB",
"url": "https://tangem.com/en/blog/post/app-update"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q6R9-R9PW-4CF7
Vulnerability from github – Published: 2025-03-28 14:48 – Updated: 2025-10-14 21:58Summary
When updating the snapshot role, TUF clients should ensure that any previously encountered targets or delegated targets metadata files continue to be present in new snapshot metadata files. Likewise, the new targets and delegated targets metadata versions must be greater than or equal to the previously encountered versions. While tough will perform this check for targets metadata files, it did not perform this check for delegated targets files.
Impact
tough could fail to detect cases where delegated targets metadata was removed or rolled back to a previous version. As a result, tough could trust and download outdated targets that it should reject.
Impacted versions: < v0.20.0
Patches
A fix for this issue is available in tough version 0.20.0 and later. Customers are advised to upgrade to version 0.20.0 or later and ensure any forked or derivative code is patched to incorporate the new fixes.
Workarounds
There is no recommended work around. Customers are advised to upgrade to version 0.20.0 or the latest version.
References
If you have any questions or comments about this advisory we ask that you contact AWS/Amazon Security via our vulnerability reporting page [1] or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
[1] Vulnerability reporting page: https://aws.amazon.com/security/vulnerability-reporting
Acknowledgement
These issues were identified by the TUF-Conformance project. We would like to thank Google for collaborating on this issue through the coordinated vulnerability disclosure process.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "tough"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.20.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-2887"
],
"database_specific": {
"cwe_ids": [
"CWE-1025"
],
"github_reviewed": true,
"github_reviewed_at": "2025-03-28T14:48:54Z",
"nvd_published_at": "2025-03-27T23:15:35Z",
"severity": "MODERATE"
},
"details": "## Summary\n\nWhen updating the snapshot role, TUF clients should ensure that any previously encountered targets or delegated targets metadata files continue to be present in new snapshot metadata files. Likewise, the new targets and delegated targets metadata versions must be greater than or equal to the previously encountered versions. While tough will perform this check for targets metadata files, it did not perform this check for delegated targets files.\n\n## Impact\n\ntough could fail to detect cases where delegated targets metadata was removed or rolled back to a previous version. As a result, tough could trust and download outdated targets that it should reject.\n\nImpacted versions: \u003c v0.20.0\n\n## Patches\n\nA fix for this issue is available in tough version 0.20.0 and later. Customers are advised to upgrade to version 0.20.0 or later and ensure any forked or derivative code is patched to incorporate the new fixes.\n\n## Workarounds\n\nThere is no recommended work around. Customers are advised to upgrade to version 0.20.0 or the latest version.\n\n## References\n\nIf you have any questions or comments about this advisory we ask that you contact AWS/Amazon Security via our vulnerability reporting page [1] or directly via email to [aws-security@amazon.com](mailto:aws-security@amazon.com). Please do not create a public GitHub issue.\n\n\n[1] Vulnerability reporting page: [https://aws.amazon.com/security/vulnerability-reporting](https://aws.amazon.com/security/vulnerability-reporting%EF%BF%BC)\n\n## Acknowledgement\n\nThese issues were identified by the [TUF-Conformance project](https://github.com/theupdateframework/tuf-conformance). We would like to thank Google for collaborating on this issue through the coordinated vulnerability disclosure process.",
"id": "GHSA-q6r9-r9pw-4cf7",
"modified": "2025-10-14T21:58:57Z",
"published": "2025-03-28T14:48:54Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/awslabs/tough/security/advisories/GHSA-q6r9-r9pw-4cf7"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-2887"
},
{
"type": "WEB",
"url": "https://github.com/awslabs/tough/commit/3345151a87c358d1ce43aeb7e8b3ebea5ebdbab4"
},
{
"type": "WEB",
"url": "https://aws.amazon.com/security/security-bulletins/AWS-2025-007"
},
{
"type": "PACKAGE",
"url": "https://github.com/awslabs/tough"
},
{
"type": "WEB",
"url": "https://github.com/awslabs/tough/releases/tag/tough-v0.20.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:H/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "tough failure to detect delegated target rollback"
}
GHSA-X53V-PXF5-CHX6
Vulnerability from github – Published: 2026-04-10 18:31 – Updated: 2026-04-10 18:31In systemd 260 before 261, a local unprivileged user can trigger an assert via an IPC API call with an array or map that has a null element.
{
"affected": [],
"aliases": [
"CVE-2026-40227"
],
"database_specific": {
"cwe_ids": [
"CWE-1025"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-04-10T16:16:33Z",
"severity": "MODERATE"
},
"details": "In systemd 260 before 261, a local unprivileged user can trigger an assert via an IPC API call with an array or map that has a null element.",
"id": "GHSA-x53v-pxf5-chx6",
"modified": "2026-04-10T18:31:18Z",
"published": "2026-04-10T18:31:18Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/systemd/systemd/security/advisories/GHSA-848h-497j-8vjq"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40227"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XVJ8-PH7X-65GF
Vulnerability from github – Published: 2026-04-18 00:41 – Updated: 2026-04-27 16:17CVE-2026-40880: Cached Mempool Verification Bypasses Consensus Rules for Ahead-of-Tip Blocks
Summary
A logic error in Zebra's transaction verification cache could allow a malicious miner to induce a consensus split. By carefully submitting a transaction that is valid for height H+1 but invalid for H+2 and then mining that transaction in a block at height H+2, a miner could cause vulnerable Zebra nodes to accept an invalid block, leading to a consensus split from the rest of the Zcash network.
Severity
High - This is a Consensus Vulnerability that could allow a malicious miner to induce network partitioning, service disruption, and potential double-spend attacks against affected nodes.
Affected Versions
All Zebra versions prior to version 4.3.1. (Some older versions are not affected but are no longer supported by the network)
Description
The vulnerability exists due to a performance optimization whose goal is to improve performance of transaction validation if the transaction was previously accepted into the mempool (and thus was verified as valid). That however did not take into account that a transaction can be valid for a specific height, but invalid at higher heights; for example, it can contain an expiry height, a lock time, and it is always bound to a network upgrade, all of which are height-dependant.
An attacker (specifically a malicious miner) could exploit this by (e.g. in the expiry height case):
- Submitting a transaction with expiry height
H+1(whereHis the height of the current tip) - Mining a block
H+1, and a blockH+2that contains that same transaction, and submitting blockH+2beforeH+1 - Zebra nodes would accept
H+2as valid (pending contextual verification) and wait for blockH+1; when it arrives, Zebra would commit both blocks even ifH+2contains an expired transaction - Other nodes (like
zcashdorzebradnodes without that transaction in their mempool) reject the block, resulting in a chain fork where the poisoned Zebra node is isolated.
Impact
Consensus Failure
Attack Vector: Network (specifically via a malicious miner). Effect: Network partition/consensus split. Scope: Any Zebra node utilizing the transaction verification cache optimization for V5 transactions.
Fixed Versions
This issue is fixed in Zebra 4.3.1.
We removed the performance optimization altogether, since we deemed it too risky.
The fix ensures that verification is only skipped if the transaction's full integrity—including authorization data—is validated against the mempool entry.
Mitigation
Users should upgrade to Zebra 4.3.0 or later immediately.
There are no known workarounds for this issue. Immediate upgrade is the only way to ensure the node remains on the correct consensus path and is protected against malicious chain forks.
Credits
Thanks to @sangsoo-osec for a thorough advisory submission that noticed the lock time issue, and to @shieldedonly with an also thorough advisory (that was submitted while we were working on the first one) who noticed that the issue applied to other aspects of the transaction validation.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "zebra-consensus"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.0.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "crates.io",
"name": "zebrad"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.3.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-40880"
],
"database_specific": {
"cwe_ids": [
"CWE-1025"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-18T00:41:54Z",
"nvd_published_at": "2026-04-21T20:17:01Z",
"severity": "HIGH"
},
"details": "# CVE-2026-40880: Cached Mempool Verification Bypasses Consensus Rules for Ahead-of-Tip Blocks\n\n## Summary\n\nA logic error in Zebra\u0027s transaction verification cache could allow a malicious miner to induce a consensus split. By carefully submitting a transaction that is valid for height `H+1` but invalid for `H+2` and then mining that transaction in a block at height `H+2`, a miner could cause vulnerable Zebra nodes to accept an invalid block, leading to a consensus split from the rest of the Zcash network.\n\n## Severity\n\nHigh - This is a Consensus Vulnerability that could allow a malicious miner to induce network partitioning, service disruption, and potential double-spend attacks against affected nodes.\n\n## Affected Versions\n\nAll Zebra versions prior to version 4.3.1. (Some older versions are not affected but are no longer supported by the network)\n\n## Description\n\nThe vulnerability exists due to a performance optimization whose goal is to improve performance of transaction validation if the transaction was previously accepted into the mempool (and thus was verified as valid). That however did not take into account that a transaction can be valid for a specific height, but invalid at higher heights; for example, it can contain an expiry height, a lock time, and it is always bound to a network upgrade, all of which are height-dependant.\n\nAn attacker (specifically a malicious miner) could exploit this by (e.g. in the expiry height case):\n\n- Submitting a transaction with expiry height `H+1` (where `H` is the height of the current tip)\n- Mining a block `H+1`, and a block `H+2` that contains that same transaction, and submitting block `H+2` before `H+1`\n- Zebra nodes would accept `H+2` as valid (pending contextual verification) and wait for block `H+1`; when it arrives, Zebra would commit both blocks even if `H+2` contains an expired transaction\n- Other nodes (like `zcashd` or `zebrad` nodes without that transaction in their mempool) reject the block, resulting in a chain fork where the poisoned Zebra node is isolated.\n\n## Impact\n\n**Consensus Failure**\n\n**Attack Vector**: Network (specifically via a malicious miner).\n**Effect**: Network partition/consensus split.\n**Scope**: Any Zebra node utilizing the transaction verification cache optimization for V5 transactions.\n\n## Fixed Versions\n\nThis issue is fixed in **Zebra 4.3.1**.\n\nWe removed the performance optimization altogether, since we deemed it too risky.\n\nThe fix ensures that verification is only skipped if the transaction\u0027s full integrity\u2014including authorization data\u2014is validated against the mempool entry.\n\n## Mitigation\n\nUsers should upgrade to Zebra 4.3.0 or later immediately.\n\nThere are no known workarounds for this issue. Immediate upgrade is the only way to ensure the node remains on the correct consensus path and is protected against malicious chain forks.\n\n## Credits\n\nThanks to @sangsoo-osec for a thorough advisory submission that noticed the lock time issue, and to @shieldedonly with an also thorough advisory (that was submitted while we were working on the first one) who noticed that the issue applied to other aspects of the transaction validation.",
"id": "GHSA-xvj8-ph7x-65gf",
"modified": "2026-04-27T16:17:07Z",
"published": "2026-04-18T00:41:54Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/ZcashFoundation/zebra/security/advisories/GHSA-xvj8-ph7x-65gf"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40880"
},
{
"type": "PACKAGE",
"url": "https://github.com/ZcashFoundation/zebra"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:H/SA:H",
"type": "CVSS_V4"
}
],
"summary": "Zebra: Cached Mempool Verification Bypasses Consensus Rules for Ahead-of-Tip Blocks"
}
No mitigation information available for this CWE.
No CAPEC attack patterns related to this CWE.