CWE-670
Allowed-with-ReviewAlways-Incorrect Control Flow Implementation
Abstraction: Class · Status: Draft
The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated.
217 vulnerabilities reference this CWE, most recent first.
GHSA-XGR7-JGQ3-MHMC
Vulnerability from github – Published: 2024-06-06 18:51 – Updated: 2024-06-17 15:23Summary
Short summary of the problem. Make the impact and severity as clear as possible. For example: An unsafe deserialization vulnerability allows any unauthenticated user to execute arbitrary code on the server.
Details
We discovered a bug walking through how to liquid stake using Safe which itself is a contract. The bug only appears when there is a local state change together with an ICS20 transfer in the same function and uses the contract's balance, that is using the contract address as the sender parameter in an ICS20 transfer using the ICS20 precompile
Proof of Concept
// This function does not reduce the contract balance correctly but liquid stakes correctly
function transfer(
string memory sourcePort,
string memory sourceChannel,
string memory denom,
uint256 amount,
string memory receiver,
string memory evmosReceiver
) external returns (uint64 nextSequence) {
counter += 1; # Only happens when there is a local state update together with an ICS20 Transfer
Height memory timeoutHeight = Height(100, 100);
string memory memo = buildLiquidStakeMemo(receiver, evmosReceiver);
return ICS20_CONTRACT.transfer(
sourcePort,
sourceChannel,
denom,
amount,
address(this), # this is the sender address which is the contract
receiver,
timeoutHeight,
0,
memo
);
}
Impact
This is in essence the "infinite money glitch" allowing contracts to double the supply of Evmos after each transaction.
Severity
Based on ImmuneFi Severity Classification System the severity was evaluated to Critical since the attack could have lead to create new supply of EVMOS and therefore lead to Direct loss of funds's value.
Patches
The issue has been patched in versions >=V18.1.0.
For more information
If you have any questions or comments about this advisory:
Reach out to the Core Team in Discord Open a discussion in evmos/evmos Email us at security@evmos.org for security questions
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 18.0.0"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v18"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 17.0.1"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v17"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 16.0.4"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v16"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 15.0.0"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v15"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 14.1.0"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v14"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 13.0.2"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v13"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 12.1.6"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v12"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 11.0.2"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v11"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 10.0.1"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v10"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 9.1.0"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v9"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 8.2.3"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v8"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 7.0.0"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v7"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 6.0.4"
},
"package": {
"ecosystem": "Go",
"name": "github.com/evmos/evmos/v6"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "18.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-37153"
],
"database_specific": {
"cwe_ids": [
"CWE-670"
],
"github_reviewed": true,
"github_reviewed_at": "2024-06-06T18:51:25Z",
"nvd_published_at": "2024-06-06T19:15:58Z",
"severity": "HIGH"
},
"details": "### Summary\n_Short summary of the problem. Make the impact and severity as clear as possible. For example: An unsafe deserialization vulnerability allows any unauthenticated user to execute arbitrary code on the server._\n\n### Details\nWe discovered a bug walking through how to liquid stake using Safe which itself is a contract. The bug only appears when there is a local state change together with an ICS20 transfer in the same function and uses the contract\u0027s balance, that is using the contract address as the `sender` parameter in an ICS20 transfer using the ICS20 precompile\n\n### Proof of Concept\n```solidity\n// This function does not reduce the contract balance correctly but liquid stakes correctly \nfunction transfer(\n string memory sourcePort,\n string memory sourceChannel,\n string memory denom,\n uint256 amount,\n string memory receiver,\n string memory evmosReceiver\n ) external returns (uint64 nextSequence) {\n counter += 1; # Only happens when there is a local state update together with an ICS20 Transfer\n Height memory timeoutHeight = Height(100, 100);\n string memory memo = buildLiquidStakeMemo(receiver, evmosReceiver);\n return ICS20_CONTRACT.transfer(\n sourcePort, \n sourceChannel,\n denom,\n amount,\n address(this), # this is the sender address which is the contract\n receiver,\n timeoutHeight,\n 0,\n memo\n );\n }\n```\n\n### Impact\nThis is in essence the \"infinite money glitch\" allowing contracts to double the supply of Evmos after each transaction.\n\n### Severity\n\nBased on [ImmuneFi Severity Classification System](https://immunefisupport.zendesk.com/hc/en-us/articles/13332717597585-Severity-Classification-System) the severity was evaluated to `Critical` since the attack could have lead to create new supply of EVMOS and therefore lead to Direct loss of funds\u0027s value.\n\n### Patches\n\nThe issue has been patched in versions \u003e=V18.1.0. \n\n## For more information\nIf you have any questions or comments about this advisory:\n\nReach out to the Core Team in [Discord](https://discord.gg/evmos)\nOpen a discussion in [evmos/evmos](https://github.com/evmos/evmos/discussions)\nEmail us at [security@evmos.org](mailto:security@evmos.org) for security questions\n",
"id": "GHSA-xgr7-jgq3-mhmc",
"modified": "2024-06-17T15:23:41Z",
"published": "2024-06-06T18:51:25Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/evmos/evmos/security/advisories/GHSA-xgr7-jgq3-mhmc"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-37153"
},
{
"type": "WEB",
"url": "https://github.com/evmos/evmos/commit/478b7a62e7af57a70cf3a01126c7f5a89bee69d7"
},
{
"type": "PACKAGE",
"url": "https://github.com/evmos/evmos"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2024-2903"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Contract balance not updating correctly after interchain transaction"
}
GHSA-XH7P-G3JR-X8P8
Vulnerability from github – Published: 2022-09-07 00:01 – Updated: 2022-09-10 00:00In vow, there is a possible undefined behavior due to an API misuse. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALPS07032604; Issue ID: ALPS07032604.
{
"affected": [],
"aliases": [
"CVE-2022-26461"
],
"database_specific": {
"cwe_ids": [
"CWE-670"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-09-06T18:15:00Z",
"severity": "MODERATE"
},
"details": "In vow, there is a possible undefined behavior due to an API misuse. This could lead to local escalation of privilege with System execution privileges needed. User interaction is not needed for exploitation. Patch ID: ALPS07032604; Issue ID: ALPS07032604.",
"id": "GHSA-xh7p-g3jr-x8p8",
"modified": "2022-09-10T00:00:33Z",
"published": "2022-09-07T00:01:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-26461"
},
{
"type": "WEB",
"url": "https://corp.mediatek.com/product-security-bulletin/September-2022"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XMJ9-7625-F634
Vulnerability from github – Published: 2026-04-15 19:19 – Updated: 2026-04-24 20:39Affected Components
- DSF FHIR Server with enabled bearer-token authentication or back-channel logout.
- DSF BPE Server with enabled bearer-token authentication or back-channel logout.
- DSF BPE Server API v2 process plugins using FHIR client connections with configured OIDC authentication.
Summary
- The OIDC JWKS and Metadata Document caches used an inverted time comparison (
isBeforeinstead ofisAfter), causing the cache to never return cached values. Every incoming request triggered a fresh HTTP fetch of the OIDC Metadata Document and JWKS keys from the OIDC provider. - The OIDC token cache for the FHIR client connections used an inverted time comparison (
isBeforeinstead ofisAfter), causing the cache to never invalidate. Every incoming request returned the same OIDC token even if expired.
Impact
- Performance: Every OIDC-authenticated request added network round-trips to the OIDC provider, increasing latency
- Reliability: Cached OIDC tokens become unusable after expiration and can only be invalidated by restart of the BPE. If the OIDC provider is temporarily unreachable, all requests fail immediately instead of using cached keys
- Load: Unnecessary load on the OIDC provider, potentially causing rate limiting
Fix (commits 31c2e974d, d3ca59b4d)
- Fixed cache timeout comparison from
isBeforetoisAfterinBaseOidcClientWithCache(configuration and JWKS caches) andOidcClientWithCache(configuration, JWKS, and access token caches) - Added configurable cache timeouts via
dev.dsf.server.auth.oidc.provider.client.cache.timeout.configuration.resourceanddev.dsf.server.auth.oidc.provider.client.cache.timeout.jwks.resource(default:PT1H)
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c 2.1.0"
},
"package": {
"ecosystem": "Maven",
"name": "dev.dsf:dsf-bpe-process-api-v2"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c 2.1.0"
},
"package": {
"ecosystem": "Maven",
"name": "dev.dsf:dsf-bpe-server"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-40942"
],
"database_specific": {
"cwe_ids": [
"CWE-670"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-15T19:19:50Z",
"nvd_published_at": "2026-04-21T22:16:19Z",
"severity": "MODERATE"
},
"details": "### Affected Components\n- DSF FHIR Server with enabled [bearer-token authentication](https://dsf.dev/operations/v2.1.0/fhir/oidc.html) or [back-channel logout](https://dsf.dev/operations/v2.1.0/fhir/oidc.html).\n- DSF BPE Server with enabled [bearer-token authentication](https://dsf.dev/operations/v2.1.0/bpe/oidc.html) or [back-channel logout](https://dsf.dev/operations/v2.1.0/bpe/oidc.html).\n- DSF BPE Server API v2 process plugins using [FHIR client connections](https://dsf.dev/operations/v2.1.0/bpe/fhir-client-connections.html) with configured OIDC authentication.\n\n### Summary\n- The OIDC JWKS and Metadata Document caches used an inverted time comparison (`isBefore` instead of `isAfter`), causing the cache to **never return cached values**. Every incoming request triggered a fresh HTTP fetch of the OIDC Metadata Document and JWKS keys from the OIDC provider.\n- The OIDC token cache for the [FHIR client connections](https://dsf.dev/operations/v2.1.0/bpe/fhir-client-connections.html) used an inverted time comparison (`isBefore` instead of `isAfter`), causing the cache to **never invalidate**. Every incoming request returned the same OIDC token even if expired.\n\n### Impact\n- **Performance:** Every OIDC-authenticated request added network round-trips to the OIDC provider, increasing latency\n- **Reliability:** Cached OIDC tokens become unusable after expiration and can only be invalidated by restart of the BPE. \n If the OIDC provider is temporarily unreachable, all requests fail immediately instead of using cached keys\n- **Load:** Unnecessary load on the OIDC provider, potentially causing rate limiting\n\n### Fix (commits 31c2e974d, d3ca59b4d)\n- Fixed cache timeout comparison from `isBefore` to `isAfter` in `BaseOidcClientWithCache` (configuration and JWKS caches) and `OidcClientWithCache` (configuration, JWKS, and access token caches)\n- Added configurable cache timeouts via `dev.dsf.server.auth.oidc.provider.client.cache.timeout.configuration.resource` and `dev.dsf.server.auth.oidc.provider.client.cache.timeout.jwks.resource` (default: `PT1H`)",
"id": "GHSA-xmj9-7625-f634",
"modified": "2026-04-24T20:39:38Z",
"published": "2026-04-15T19:19:50Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/datasharingframework/dsf/security/advisories/GHSA-xmj9-7625-f634"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40942"
},
{
"type": "WEB",
"url": "https://github.com/datasharingframework/dsf/commit/31c2e974dfd4351756104ee8c53dbcd666192fef"
},
{
"type": "WEB",
"url": "https://github.com/datasharingframework/dsf/commit/d3ca59b4daccde16a006fedeccce28fd1f826908"
},
{
"type": "PACKAGE",
"url": "https://github.com/datasharingframework/dsf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Data Sharing Framework has an Inverted Time Comparison in OIDC JWKS and Token Cache"
}
GHSA-XMPG-XCMW-JV5W
Vulnerability from github – Published: 2023-01-26 21:30 – Updated: 2023-02-01 21:30In onPackageRemoved of AccessibilityManagerService.java, there is a possibility to automatically grant accessibility services due to a logic error in the code. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is needed for exploitation.Product: AndroidVersions: Android-10 Android-11 Android-12 Android-12L Android-13Android ID: A-243378132
{
"affected": [],
"aliases": [
"CVE-2023-20921"
],
"database_specific": {
"cwe_ids": [
"CWE-670"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-01-26T21:18:00Z",
"severity": "HIGH"
},
"details": "In onPackageRemoved of AccessibilityManagerService.java, there is a possibility to automatically grant accessibility services due to a logic error in the code. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is needed for exploitation.Product: AndroidVersions: Android-10 Android-11 Android-12 Android-12L Android-13Android ID: A-243378132",
"id": "GHSA-xmpg-xcmw-jv5w",
"modified": "2023-02-01T21:30:24Z",
"published": "2023-01-26T21:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-20921"
},
{
"type": "WEB",
"url": "https://source.android.com/security/bulletin/2023-01-01"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XQ4J-J5QP-3MFQ
Vulnerability from github – Published: 2023-04-02 21:30 – Updated: 2023-04-10 15:30Insufficient control flow management in AmdCpmOemSmm may allow a privileged attacker to tamper with the SMM handler potentially leading to an escalation of privileges.
{
"affected": [],
"aliases": [
"CVE-2023-20558"
],
"database_specific": {
"cwe_ids": [
"CWE-670"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-04-02T21:15:00Z",
"severity": "HIGH"
},
"details": "Insufficient control flow management in AmdCpmOemSmm may allow a privileged attacker to tamper with the SMM handler potentially leading to an escalation of privileges.",
"id": "GHSA-xq4j-j5qp-3mfq",
"modified": "2023-04-10T15:30:26Z",
"published": "2023-04-02T21:30:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-20558"
},
{
"type": "WEB",
"url": "https://www.amd.com/en/resources/product-security/bulletin/amd-sb-1027.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-XW5W-XHJV-GF29
Vulnerability from github – Published: 2026-05-08 09:31 – Updated: 2026-05-08 09:31In uriparser before 1.0.2, the function family EqualsUri can misclassify two unequal URIs as equal.
{
"affected": [],
"aliases": [
"CVE-2026-44928"
],
"database_specific": {
"cwe_ids": [
"CWE-670"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-08T08:16:44Z",
"severity": "LOW"
},
"details": "In uriparser before 1.0.2, the function family EqualsUri can misclassify two unequal URIs as equal.",
"id": "GHSA-xw5w-xhjv-gf29",
"modified": "2026-05-08T09:31:30Z",
"published": "2026-05-08T09:31:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-44928"
},
{
"type": "WEB",
"url": "https://github.com/uriparser/uriparser/pull/305"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-XWVM-8X4Q-GMR9
Vulnerability from github – Published: 2022-05-24 19:15 – Updated: 2025-10-30 21:30A vulnerability in IPv6 traffic processing of Cisco IOS XE Wireless Controller Software for Cisco Catalyst 9000 Family Wireless Controllers could allow an unauthenticated, adjacent attacker to cause a Layer 2 (L2) loop in a configured VLAN, resulting in a denial of service (DoS) condition for that VLAN. The vulnerability is due to a logic error when processing specific link-local IPv6 traffic. An attacker could exploit this vulnerability by sending a crafted IPv6 packet that would flow inbound through the wired interface of an affected device. A successful exploit could allow the attacker to cause traffic drops in the affected VLAN, thus triggering the DoS condition.
{
"affected": [],
"aliases": [
"CVE-2021-34767"
],
"database_specific": {
"cwe_ids": [
"CWE-670"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-09-23T03:15:00Z",
"severity": "HIGH"
},
"details": "A vulnerability in IPv6 traffic processing of Cisco IOS XE Wireless Controller Software for Cisco Catalyst 9000 Family Wireless Controllers could allow an unauthenticated, adjacent attacker to cause a Layer 2 (L2) loop in a configured VLAN, resulting in a denial of service (DoS) condition for that VLAN. The vulnerability is due to a logic error when processing specific link-local IPv6 traffic. An attacker could exploit this vulnerability by sending a crafted IPv6 packet that would flow inbound through the wired interface of an affected device. A successful exploit could allow the attacker to cause traffic drops in the affected VLAN, thus triggering the DoS condition.",
"id": "GHSA-xwvm-8x4q-gmr9",
"modified": "2025-10-30T21:30:34Z",
"published": "2022-05-24T19:15:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-34767"
},
{
"type": "WEB",
"url": "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ewlc-ipv6-dos-NMYeCnZv"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
No mitigation information available for this CWE.
No CAPEC attack patterns related to this CWE.