{"id":"GHSA-jc42-994r-vvwp","summary":"cassandra-jdbc-wrapper: Authentication Token Exposed in Logs","details":"### Summary\nThe fix for [AIKIDO-2024-10565](https://intel.aikido.dev/cve/AIKIDO-2024-10565) (plaintext password logging) introduced two\nredaction helpers — `DriverUtil.toStringWithoutSensitiveValues()` and\n`DriverUtil.redactSensitiveValuesInJdbcUrl()` — but both helpers only redact\nthe `\"password\"` property/parameter (`JdbcUrlUtil.TAG_PASSWORD`). The equally\nsensitive `\"token\"` property (`JdbcUrlUtil.TAG_TOKEN`), used for DataStax\nAstra and other token-based Cassandra authentication, is completely unredacted\nby both helpers. Applications using token-based authentication with DEBUG\nlogging enabled will therefore log the live authentication token in plaintext\nvia `SessionHolder`'s calls to these same two helpers — the exact same\nexposure pattern that the original fix was intended to prevent.\n\n### Details\n**File:** `src/main/java/com/ing/data/cassandra/jdbc/utils/DriverUtil.java`\n\n```java\n// toStringWithoutSensitiveValues (lines 341-347) -- only redacts \"password\"\npublic static String toStringWithoutSensitiveValues(final Properties properties) {\n    final Properties withRedactedSensitiveValues = (Properties) properties.clone();\n    if (withRedactedSensitiveValues.containsKey(TAG_PASSWORD)) {\n        withRedactedSensitiveValues.setProperty(TAG_PASSWORD, \"***\");\n    }\n    return withRedactedSensitiveValues.toString();\n}\n\n// redactSensitiveValuesInJdbcUrl (lines 355-378) -- only redacts \"password\"\nfinal String redactedQuery = Arrays.stream(...)\n    .map(param -\u003e {\n        if (param.startsWith(TAG_PASSWORD + \"=\")) {\n            return TAG_PASSWORD + \"=***\";\n        }\n        return param;     // \u003c-- \"token=...\" passes through unmodified\n    })\n    ...\n```\n\n`JdbcUrlUtil.java` defines `TAG_TOKEN = \"token\"` (line 407) as a separate,\ndistinct connection property used when connecting with DataStax Astra-style\ntoken-based authentication. Neither redaction helper checks for this key.\n\n**File:** `src/main/java/com/ing/data/cassandra/jdbc/SessionHolder.java`\n\nBoth helpers are called on connection-level properties at DEBUG log level:\n\n```java\n// Line 150 — logs all connection properties including \"token\" unredacted\nlog.debug(\"Final Properties to Connection: {}\",\n    toStringWithoutSensitiveValues(this.properties));\n\n// Lines 173, 190 — logs JDBC URL including \"?token=...\" unredacted\nfinal String jdbcUrl = redactSensitiveValuesInJdbcUrl(this.cacheKey.get(URL_KEY));\nlog.debug(\"Released last reference to {}, closing Session.\", jdbcUrl);\nlog.debug(\"Acquired reference to {}, new count = {}.\", jdbcUrl, ref + 1);\n```\n\nDEBUG logging is commonly enabled in production troubleshooting and staging\nenvironments, meaning the token is logged in plain text every time a\nconnection is acquired or released in such environments.\n\n### PoC\n**Environment:** JDK 17+, Maven 3.x\n\n**pom.xml dependency:**\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.ing.data\u003c/groupId\u003e\n    \u003cartifactId\u003ecassandra-jdbc-wrapper\u003c/artifactId\u003e\n    \u003cversion\u003e5.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n**Exploit.java:**\n```java\nimport com.ing.data.cassandra.jdbc.utils.DriverUtil;\nimport java.util.Properties;\n\npublic class Exploit {\n    public static void main(String[] args) throws Exception {\n        String secretToken = \"AstraCS:SUPER_SECRET_TOKEN_VALUE_1234567890\";\n\n        // Test 1: redactSensitiveValuesInJdbcUrl()\n        String urlWithToken = \"jdbc:cassandra://host:9042/ks?token=\" + secretToken;\n        String redacted = DriverUtil.redactSensitiveValuesInJdbcUrl(urlWithToken);\n        System.out.println(\"Token in 'redacted' URL: \" + redacted.contains(secretToken)); // true\n\n        // Test 2: toStringWithoutSensitiveValues()\n        Properties props = new Properties();\n        props.setProperty(\"token\", secretToken);\n        String redactedProps = DriverUtil.toStringWithoutSensitiveValues(props);\n        System.out.println(\"Token in 'redacted' props: \" + redactedProps.contains(secretToken)); // true\n\n        // Control: password IS correctly redacted\n        Properties propsWithPassword = new Properties();\n        propsWithPassword.setProperty(\"password\", \"secret\");\n        System.out.println(\"Password redacted: \" +\n            !DriverUtil.toStringWithoutSensitiveValues(propsWithPassword).contains(\"secret\")); // true\n    }\n}\n```\n\n**Result (confirmed, 3/3 reproductions on cassandra-jdbc-wrapper 5.0.1, the latest release):**\n\n```\nToken in 'redacted' URL:   true   \u003c- token leaks through the URL redactor\nToken in 'redacted' props: true   \u003c- token leaks through the property redactor\nPassword redacted:         true   \u003c- password IS correctly masked (control)\n```\n\nThe \"redacted\" output for a token-based connection string is byte-for-byte\nidentical to the unredacted original — the helpers have no effect on `token`.\n\n### Impact\n**Vulnerability type:** Insertion of Sensitive Information into Log File (CWE-532).\n\nAn authentication token (functionally equivalent in sensitivity to a password\n— it grants full access to the Cassandra cluster) is written in plaintext to\napplication log files whenever:\n- The application uses token-based authentication (e.g., DataStax Astra), AND\n- DEBUG logging is enabled (common in staging environments and during\n  production troubleshooting sessions).\n\nAn attacker who can read log files — via log aggregation system access,\nmisconfigured log storage, or a separate log-reading vulnerability — can\nextract a live authentication token and use it to authenticate directly to\nthe Cassandra cluster, accessing all data the token is authorized to read or\nwrite.\n\nThis is exactly the same impact class as the original AIKIDO-2024-10565 fix\nwas intended to prevent — the fix simply missed a second sensitive credential\ntype that was already present in the codebase.","aliases":["CVE-2026-73504"],"modified":"2026-11-19T01:30:03.510710853Z","published":"2026-11-19T00:50:28Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-11-19T00:50:28Z","nvd_published_at":"2026-11-18T20:19:12Z","cwe_ids":["CWE-532"]},"references":[{"type":"WEB","url":"https://github.com/ing-bank/cassandra-jdbc-wrapper/security/advisories/GHSA-jc42-994r-vvwp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-73504"},{"type":"WEB","url":"https://github.com/ing-bank/cassandra-jdbc-wrapper/commit/0b7ea0322e538304119f58f1214e4171312b245b"},{"type":"WEB","url":"https://github.com/ing-bank/cassandra-jdbc-wrapper/commit/ace58f7cf5c981d8dfe302f1a514ae4c6f827f38"},{"type":"PACKAGE","url":"https://github.com/ing-bank/cassandra-jdbc-wrapper"},{"type":"WEB","url":"https://github.com/ing-bank/cassandra-jdbc-wrapper/releases/tag/v4.16.4"},{"type":"WEB","url":"https://github.com/ing-bank/cassandra-jdbc-wrapper/releases/tag/v5.0.2"}],"affected":[{"package":{"name":"com.ing.data:cassandra-jdbc-wrapper","ecosystem":"Maven","purl":"pkg:maven/com.ing.data/cassandra-jdbc-wrapper"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0.0"},{"fixed":"5.0.2"}]}],"versions":["5.0.0","5.0.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-jc42-994r-vvwp/GHSA-jc42-994r-vvwp.json"}},{"package":{"name":"com.ing.data:cassandra-jdbc-wrapper","ecosystem":"Maven","purl":"pkg:maven/com.ing.data/cassandra-jdbc-wrapper"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.16.4"}]}],"versions":["4.10.0","4.10.1","4.10.2","4.11.0","4.11.1","4.12.0","4.13.0","4.13.1","4.14.0","4.15.0","4.16.0","4.16.1","4.16.2","4.16.3","4.4.0","4.5.0","4.6.0","4.7.0","4.8.0","4.9.0","4.9.1"],"database_specific":{"last_known_affected_version_range":"\u003c= 4.16.3","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/11/GHSA-jc42-994r-vvwp/GHSA-jc42-994r-vvwp.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"}]}