CWE-168
Improper Handling of Inconsistent Special Elements
The product does not properly handle input in which an inconsistency exists between two or more special characters or reserved words.
CVE-2023-36843 (GCVE-0-2023-36843)
Vulnerability from cvelistv5
Published
2023-10-12 22:58
Modified
2024-09-18 17:53
Severity ?
VLAI Severity ?
EPSS score ?
CWE
- CWE-168 - Improper Handling of Inconsistent Special Elements
- Denial of Service (DoS)
Summary
An Improper Handling of Inconsistent Special Elements vulnerability in the Junos Services Framework (jsf) module of Juniper Networks Junos OS allows an unauthenticated network based attacker to cause a crash in the Packet Forwarding Engine (pfe) and thereby resulting in a Denial of Service (DoS).
Upon receiving malformed SSL traffic, the PFE crashes. A manual restart will be needed to recover the device.
This issue only affects devices with Juniper Networks Advanced Threat Prevention (ATP) Cloud enabled with Encrypted Traffic Insights (configured via ‘security-metadata-streaming policy’).
This issue affects Juniper Networks Junos OS:
* All versions prior to 20.4R3-S8, 20.4R3-S9;
* 21.1 version 21.1R1 and later versions;
* 21.2 versions prior to 21.2R3-S6;
* 21.3 versions prior to 21.3R3-S5;
* 21.4 versions prior to 21.4R3-S5;
* 22.1 versions prior to 22.1R3-S4;
* 22.2 versions prior to 22.2R3-S2;
* 22.3 versions prior to 22.3R2-S2, 22.3R3;
* 22.4 versions prior to 22.4R2-S1, 22.4R3;
References
► | URL | Tags | |||
---|---|---|---|---|---|
|
Impacted products
Vendor | Product | Version | ||
---|---|---|---|---|
Juniper Networks | Junos OS |
Version: 0 ≤ Version: 21.1R1 ≤ Version: 21.2 ≤ Version: 21.3 ≤ Version: 21.4 ≤ Version: 22.1 ≤ Version: 22.2 ≤ Version: 22.3 ≤ Version: 22.4 ≤ |
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-02T17:01:09.673Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "tags": [ "vendor-advisory", "x_transferred" ], "url": "https://supportportal.juniper.net/JSA73174" } ], "title": "CVE Program Container" }, { "affected": [ { "cpes": [ "cpe:2.3:o:juniper_networks:junos_os:*:*:*:*:*:*:*:*" ], "defaultStatus": "unknown", "product": "junos_os", "vendor": "juniper_networks", "versions": [ { "lessThan": "20.4r3-s8", "status": "affected", "version": "0", "versionType": "semver" }, { "lessThan": "21.1", "status": "affected", "version": "21.1r1", "versionType": "semver" }, { "lessThan": "21.2r3-s6", "status": "affected", "version": "21.2", "versionType": "semver" }, { "lessThan": "21.3r3-s5", "status": "affected", "version": "21.3", "versionType": "semver" }, { "lessThan": "21.4r3-s5", "status": "affected", "version": "21.4", "versionType": "semver" }, { "lessThan": "22.1r3-s2", "status": "affected", "version": "22.1", "versionType": "semver" }, { "lessThan": "22.2r3-s2", "status": "affected", "version": "22.2", "versionType": "semver" }, { "lessThan": "22.3r2-s2", "status": "affected", "version": "22.3", "versionType": "semver" }, { "lessThan": "22.3r3", "status": "affected", "version": "22.3", "versionType": "semver" }, { "lessThan": "22.4r2-s2", "status": "affected", "version": "22.4", "versionType": "semver" }, { "lessThan": "22.4r3", "status": "affected", "version": "22.4", "versionType": "semver" } ] } ], "metrics": [ { "other": { "content": { "id": "CVE-2023-36843", "options": [ { "Exploitation": "none" }, { "Automatable": "yes" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-09-18T17:43:08.375533Z", "version": "2.0.3" }, "type": "ssvc" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-168", "description": "CWE-168 Improper Handling of Inconsistent Special Elements", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2024-09-18T17:53:30.073Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "defaultStatus": "unaffected", "platforms": [ "SRX Series" ], "product": "Junos OS", "vendor": "Juniper Networks", "versions": [ { "lessThan": "20.4R3-S8", "status": "affected", "version": "0", "versionType": "semver" }, { "lessThan": "21.1*", "status": "affected", "version": "21.1R1", "versionType": "semver" }, { "lessThan": "21.2R3-S6", "status": "affected", "version": "21.2", "versionType": "semver" }, { "lessThan": "21.3R3-S5", "status": "affected", "version": "21.3", "versionType": "semver" }, { "lessThan": "21.4R3-S5", "status": "affected", "version": "21.4", "versionType": "semver" }, { "lessThan": "22.1R3-S4", "status": "affected", "version": "22.1", "versionType": "semver" }, { "lessThan": "22.2R3-S2", "status": "affected", "version": "22.2", "versionType": "semver" }, { "lessThan": "22.3R2-S2, 22.3R3", "status": "affected", "version": "22.3", "versionType": "semver" }, { "lessThan": "22.4R2-S1, 22.4R3", "status": "affected", "version": "22.4", "versionType": "semver" } ] } ], "configurations": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "\u003cp\u003eThe below command configures security-metadata-streaming:\u003c/p\u003e\u003ctt\u003e[ set services security-metadata-streaming policy ]\u003c/tt\u003e" } ], "value": "The below command configures security-metadata-streaming:\n\n[ set services security-metadata-streaming policy ]" } ], "datePublic": "2023-10-11T16:00:00.000Z", "descriptions": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "\n\n\u003cp\u003eAn Improper Handling of Inconsistent Special Elements vulnerability in the Junos Services Framework (jsf) module of Juniper Networks Junos OS allows an unauthenticated network based attacker to cause a crash in the Packet Forwarding Engine (pfe) and thereby resulting in a Denial of Service (DoS).\u003c/p\u003e\u003cp\u003eUpon receiving malformed SSL traffic, the PFE crashes. A manual restart will be needed to recover the device.\u003c/p\u003e\u003cp\u003eThis issue only affects devices with Juniper Networks Advanced Threat Prevention (ATP) Cloud enabled with Encrypted Traffic Insights (configured via \u2018security-metadata-streaming policy\u2019).\u003c/p\u003e\u003cp\u003eThis issue affects Juniper Networks Junos OS:\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cul\u003e\u003cli\u003eAll versions prior to 20.4R3-S8, 20.4R3-S9;\u003c/li\u003e\u003cli\u003e21.1 version 21.1R1 and later versions;\u003c/li\u003e\u003cli\u003e21.2 versions prior to 21.2R3-S6;\u003c/li\u003e\u003cli\u003e21.3 versions prior to 21.3R3-S5;\u003c/li\u003e\u003cli\u003e21.4 versions prior to 21.4R3-S5;\u003c/li\u003e\u003cli\u003e22.1 versions prior to 22.1R3-S4;\u003c/li\u003e\u003cli\u003e22.2 versions prior to 22.2R3-S2;\u003c/li\u003e\u003cli\u003e22.3 versions prior to 22.3R2-S2, 22.3R3;\u003c/li\u003e\u003cli\u003e22.4 versions prior to 22.4R2-S1, 22.4R3;\u003c/li\u003e\u003c/ul\u003e\u003cp\u003e\u003c/p\u003e\n\n" } ], "value": "\nAn Improper Handling of Inconsistent Special Elements vulnerability in the Junos Services Framework (jsf) module of Juniper Networks Junos OS allows an unauthenticated network based attacker to cause a crash in the Packet Forwarding Engine (pfe) and thereby resulting in a Denial of Service (DoS).\n\nUpon receiving malformed SSL traffic, the PFE crashes. A manual restart will be needed to recover the device.\n\nThis issue only affects devices with Juniper Networks Advanced Threat Prevention (ATP) Cloud enabled with Encrypted Traffic Insights (configured via \u2018security-metadata-streaming policy\u2019).\n\nThis issue affects Juniper Networks Junos OS:\n\n\n\n * All versions prior to 20.4R3-S8, 20.4R3-S9;\n * 21.1 version 21.1R1 and later versions;\n * 21.2 versions prior to 21.2R3-S6;\n * 21.3 versions prior to 21.3R3-S5;\n * 21.4 versions prior to 21.4R3-S5;\n * 22.1 versions prior to 22.1R3-S4;\n * 22.2 versions prior to 22.2R3-S2;\n * 22.3 versions prior to 22.3R2-S2, 22.3R3;\n * 22.4 versions prior to 22.4R2-S1, 22.4R3;\n\n\n\n\n\n\n" } ], "exploits": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "\u003cp\u003eJuniper SIRT is not aware of any malicious exploitation of this vulnerability.\u003c/p\u003e" } ], "value": "Juniper SIRT is not aware of any malicious exploitation of this vulnerability.\n\n" } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 7.5, "baseSeverity": "HIGH", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "version": "3.1" }, "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ] } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-168", "description": " CWE-168: Improper Handling of Inconsistent Special Elements", "lang": "en", "type": "CWE" } ] }, { "descriptions": [ { "description": "Denial of Service (DoS)", "lang": "en" } ] } ], "providerMetadata": { "dateUpdated": "2023-10-12T22:58:49.192Z", "orgId": "8cbe9d5a-a066-4c94-8978-4b15efeae968", "shortName": "juniper" }, "references": [ { "tags": [ "vendor-advisory" ], "url": "https://supportportal.juniper.net/JSA73174" } ], "solutions": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "\u003cp\u003eThe following software releases have been updated to resolve this specific issue: Junos OS 20.4R3-S8, 21.2R3-S6, 21.3R3-S5, 21.4R3-S5, 22.1R3-S4, 22.2R3-S2, 22.3R2-S2, 22.3R3, 22.4R2-S1, 22.4R3, 23.1R2, 23.2R1, and all subsequent releases.\u003c/p\u003e" } ], "value": "The following software releases have been updated to resolve this specific issue: Junos OS 20.4R3-S8, 21.2R3-S6, 21.3R3-S5, 21.4R3-S5, 22.1R3-S4, 22.2R3-S2, 22.3R2-S2, 22.3R3, 22.4R2-S1, 22.4R3, 23.1R2, 23.2R1, and all subsequent releases.\n\n" } ], "source": { "advisory": "JSA73174", "defect": [ "1696110" ], "discovery": "INTERNAL" }, "timeline": [ { "lang": "en", "time": "2023-10-11T16:00:00.000Z", "value": "Initial Publication" } ], "title": "Junos OS: SRX Series: The PFE will crash on receiving malformed SSL traffic when Sky ATP is enabled", "workarounds": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "\u003cp\u003eRemoving the security-metadata-streaming policy from the configuration stops the issue.\u003c/p\u003e" } ], "value": "Removing the security-metadata-streaming policy from the configuration stops the issue.\n\n" } ], "x_generator": { "engine": "Vulnogram 0.1.0-av217" } } }, "cveMetadata": { "assignerOrgId": "8cbe9d5a-a066-4c94-8978-4b15efeae968", "assignerShortName": "juniper", "cveId": "CVE-2023-36843", "datePublished": "2023-10-12T22:58:49.192Z", "dateReserved": "2023-06-27T16:17:25.276Z", "dateUpdated": "2024-09-18T17:53:30.073Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
CVE-2023-6245 (GCVE-0-2023-6245)
Vulnerability from cvelistv5
Published
2023-12-08 14:26
Modified
2024-12-02 14:33
Severity ?
VLAI Severity ?
EPSS score ?
CWE
Summary
The Candid library causes a Denial of Service while
parsing a specially crafted payload with 'empty' data type. For example,
if the payload is `record { * ; empty }` and the canister interface expects `record { * }` then the Rust candid decoder treats empty as an extra field required by the type. The problem with the type empty is that the candid Rust library wrongly categorizes empty as a recoverable error when skipping the field and thus causing an infinite decoding loop.
Canisters using affected versions of candid
are exposed to denial of service by causing the decoding to run
indefinitely until the canister traps due to reaching maximum
instruction limit per execution round. Repeated exposure to the payload
will result in degraded performance of the canister. Note: Canisters written in Motoko are unaffected.
References
Impacted products
Vendor | Product | Version | ||
---|---|---|---|---|
Internet Computer | Candid |
Version: 0.9.0 |
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-02T08:21:17.978Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "tags": [ "x_transferred" ], "url": "https://github.com/dfinity/candid/pull/478" }, { "tags": [ "x_transferred" ], "url": "https://internetcomputer.org/docs/current/references/candid-ref" }, { "tags": [ "x_transferred" ], "url": "https://github.com/dfinity/candid/blob/master/spec/Candid.md" }, { "tags": [ "x_transferred" ], "url": "https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j" }, { "tags": [ "x_transferred" ], "url": "https://internetcomputer.org/docs/current/references/ic-interface-spec" } ], "title": "CVE Program Container" }, { "metrics": [ { "other": { "content": { "id": "CVE-2023-6245", "options": [ { "Exploitation": "none" }, { "Automatable": "yes" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-12-02T14:31:05.379872Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-12-02T14:33:16.496Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "defaultStatus": "unaffected", "product": "Candid", "repo": "https://github.com/dfinity/candid", "vendor": "Internet Computer", "versions": [ { "lessThan": "0.9.10", "status": "affected", "version": "0.9.0", "versionType": "0.0.0" } ] } ], "datePublic": "2023-12-08T01:55:00.000Z", "descriptions": [ { "lang": "en", "supportingMedia": [ { "base64": false, "type": "text/html", "value": "\u003cp\u003eThe Candid library causes a Denial of Service while \nparsing a specially crafted payload with \u0027empty\u0027 data type. For example,\n if the payload is \u003ccode\u003e`record { * ; empty }`\u003c/code\u003e and the canister interface expects \u003ccode\u003e`record { * }`\u003c/code\u003e then the Rust candid decoder treats \u003ccode\u003eempty\u003c/code\u003e as an extra field required by the type. The problem with the type \u003ccode\u003eempty\u003c/code\u003e is that the candid Rust library wrongly categorizes \u003ccode\u003eempty\u003c/code\u003e as a recoverable error when skipping the field and thus causing an infinite decoding loop.\u003c/p\u003e\n\u003cp\u003eCanisters using affected versions of candid\n are exposed to denial of service by causing the decoding to run \nindefinitely until the canister traps due to reaching maximum \ninstruction limit per execution round. Repeated exposure to the payload \nwill result in degraded performance of the canister. Note: Canisters written in Motoko are unaffected.\u003cbr\u003e\u003c/p\u003e\u003cbr\u003e" } ], "value": "The Candid library causes a Denial of Service while \nparsing a specially crafted payload with \u0027empty\u0027 data type. For example,\n if the payload is `record { * ; empty }` and the canister interface expects `record { * }` then the Rust candid decoder treats empty as an extra field required by the type. The problem with the type empty is that the candid Rust library wrongly categorizes empty as a recoverable error when skipping the field and thus causing an infinite decoding loop.\n\n\nCanisters using affected versions of candid\n are exposed to denial of service by causing the decoding to run \nindefinitely until the canister traps due to reaching maximum \ninstruction limit per execution round. Repeated exposure to the payload \nwill result in degraded performance of the canister. Note: Canisters written in Motoko are unaffected.\n\n\n\n" } ], "impacts": [ { "descriptions": [ { "lang": "en", "value": "Denial of Service" } ] } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 7.5, "baseSeverity": "HIGH", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "version": "3.1" }, "format": "CVSS", "scenarios": [ { "lang": "en", "value": "GENERAL" } ] } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-835", "description": "CWE-835 Loop with Unreachable Exit Condition (\u0027Infinite Loop\u0027)", "lang": "en", "type": "CWE" } ] }, { "descriptions": [ { "cweId": "CWE-1288", "description": "CWE-1288 Improper Validation of Consistency within Input", "lang": "en", "type": "CWE" } ] }, { "descriptions": [ { "cweId": "CWE-168", "description": "CWE-168 Improper Handling of Inconsistent Special Elements", "lang": "en", "type": "CWE" } ] }, { "descriptions": [ { "cweId": "CWE-20", "description": "CWE-20 Improper Input Validation", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2023-12-08T14:26:09.331Z", "orgId": "6b35d637-e00f-4228-858c-b20ad6e1d07b", "shortName": "Dfinity" }, "references": [ { "url": "https://github.com/dfinity/candid/pull/478" }, { "url": "https://internetcomputer.org/docs/current/references/candid-ref" }, { "url": "https://github.com/dfinity/candid/blob/master/spec/Candid.md" }, { "url": "https://github.com/dfinity/candid/security/advisories/GHSA-7787-p7x6-fq3j" }, { "url": "https://internetcomputer.org/docs/current/references/ic-interface-spec" } ], "source": { "discovery": "INTERNAL" }, "title": "Infinite decoding loop through specially crafted payload", "x_generator": { "engine": "Vulnogram 0.1.0-dev" } } }, "cveMetadata": { "assignerOrgId": "6b35d637-e00f-4228-858c-b20ad6e1d07b", "assignerShortName": "Dfinity", "cveId": "CVE-2023-6245", "datePublished": "2023-12-08T14:26:09.331Z", "dateReserved": "2023-11-21T16:28:51.715Z", "dateUpdated": "2024-12-02T14:33:16.496Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
Mitigation
Phases:
Description:
- Developers should anticipate that inconsistent special elements will be injected/manipulated in the input vectors of their product. Use an appropriate combination of denylists and allowlists to ensure only valid, expected and appropriate input is processed by the system.
Mitigation ID: MIT-5
Phase: Implementation
Strategy: Input Validation
Description:
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
Mitigation ID: MIT-20
Phase: Implementation
Strategy: Input Validation
Description:
- Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
No CAPEC attack patterns related to this CWE.