SAP CommonCryptoLib: Incorrect Authorization
CVE-2023-40309 is a critical-severity incorrect authorization vulnerability in SAP CommonCryptoLib from SAP, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected SAP CommonCryptoLib versions: 8. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.88% chance of exploitation within 30 days, higher than 60% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Check which version of SAP CommonCryptoLib you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on me.sap.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| SAP | SAP CommonCryptoLib | 8 | Not stated |
| SAP | SAP NetWeaver AS ABAP, SAP NetWeaver AS Java and ABAP Platform of S/4HANA on-premise | KERNEL 7.22; KERNEL 7.53; KERNEL 7.54; KERNEL 7.77; KERNEL 7.85; KERNEL 7.89; KERNEL 7.91; KERNEL 7.92; and 8 more ranges | Not stated |
| SAP | SAP Web Dispatcher | 7.22EXT; 7.53; 7.54; 7.77; 7.85; 7.89 | Not stated |
| SAP | SAP Content Server | 6.50; 7.53; 7.54 | Not stated |
| SAP | SAP HANA Database | 2.00 | Not stated |
| SAP | SAP Host Agent | 722 | Not stated |
| SAP | SAP Extended Application Services and Runtime (XSA) | SAP_EXTENDED_APP_SERVICES 1; XS_ADVANCED_RUNTIME 1.00 | Not stated |
| SAP | SAPSSOEXT | 17 | Not stated |
| SAP | Commoncryptolib | 8.0.0 | Not stated |
| SAP | Content Server | 6.50; 7.53; 7.54 | Not stated |
| SAP | Extended Application Services And Runtime | 1.0 | Not stated |
| SAP | Hana Database | 2.0 | Not stated |
| SAP | Host Agent | 722 | Not stated |
| SAP | Netweaver Application Server Abap | 7.22ext; kernel_7.22; kernel_7.53; kernel_7.54; kernel_7.77; kernel_7.85; kernel_7.89; kernel_7.91; and 9 more ranges | Not stated |
| SAP | Netweaver Application Server Java | kernel_7.22; kernel_7.53; kernel_7.54; kernel_7.77; kernel_7.85; kernel_7.89; kernel_7.91; kernel_7.92; and 8 more ranges | Not stated |
| SAP | Web Dispatcher | 7.22ext; 7.53; 7.54; 7.77; 7.85; 7.89 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 9.8 | Critical | CNA (sap.com) |
| CVSS 3.1 | 9.8 | Critical | NVD |
Official description
SAP CommonCryptoLib does not perform necessary authentication checks, which may result in missing or wrong authorization checks for an authenticated user, resulting in escalation of privileges. Depending on the application and the level of privileges acquired, an attacker could abuse functionality restricted to a particular user group as well as read, modify or delete restricted data.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.
How developers prevent this class of flaw
- Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Ensure that access control checks are performed related to the business logic. These checks may be different than the access control checks that are applied to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor.
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework and the OWASP ESAPI Access Control feature.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Other vulnerabilities in SAP CommonCryptoLib
- 7.5 High severity
- 7.5 High severity
Recent Incorrect Authorization vulnerabilities
- 7.5 High severity
- 9.1 Critical severity
- 7.8 High severity
- 9.8 Critical severity
Ivanti Sentry Authentication Bypass Exploited
- 8.0 High severity
- 9.8 Critical severity
Spotted an error? Tell us.