From cddae9a473c0ce1e829132a0b27b5973c2cdf2ef Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 15:46:48 +0000 Subject: [PATCH] Publish GHSA-gr79-9v6v-gc9r --- .../GHSA-gr79-9v6v-gc9r.json | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/advisories/github-reviewed/2024/01/GHSA-gr79-9v6v-gc9r/GHSA-gr79-9v6v-gc9r.json b/advisories/github-reviewed/2024/01/GHSA-gr79-9v6v-gc9r/GHSA-gr79-9v6v-gc9r.json index 1252848763f..ec4a6b934df 100644 --- a/advisories/github-reviewed/2024/01/GHSA-gr79-9v6v-gc9r/GHSA-gr79-9v6v-gc9r.json +++ b/advisories/github-reviewed/2024/01/GHSA-gr79-9v6v-gc9r/GHSA-gr79-9v6v-gc9r.json @@ -1,13 +1,13 @@ { "schema_version": "1.4.0", "id": "GHSA-gr79-9v6v-gc9r", - "modified": "2024-07-08T19:49:51Z", + "modified": "2025-05-27T15:45:13Z", "published": "2024-01-26T01:57:31Z", "aliases": [ "CVE-2024-23656" ], "summary": "Dex discarding TLSconfig and always serves deprecated TLS 1.0/1.1 and insecure ciphers", - "details": "### Summary\n\nDex 2.37.0 is serving HTTPS with insecure TLS 1.0 and TLS 1.1.\n\n\n### Details\nWhile working on https://github.com/dexidp/dex/issues/2848 and implementing configurable TLS support, I noticed my changes did not have any effect in TLS config, so I started investigating. \n\nhttps://github.com/dexidp/dex/blob/70d7a2c7c1bb2646b1a540e49616cbc39622fb83/cmd/dex/serve.go#L425 is seemingly setting TLS 1.2 as minimum version, but the whole tlsConfig is ignored after \"TLS cert reloader\" was introduced in https://github.com/dexidp/dex/pull/2964. Configured cipher suites are not respected either, as seen on the output.\n\n### PoC\nBuild Dex, generate certs with `gencert.sh`, modify `config.dev.yaml` to run on https, using generated certs.\n\n```console\nissuer: http://127.0.0.1:5556/dex\n\nstorage:\n type: sqlite3\n config:\n file: dex.db\n\nweb:\n https: 127.0.0.1:5556\n tlsCert: examples/k8s/ssl/cert.pem\n tlsKey: examples/k8s/ssl/key.pem\n\n\n```\n\nRun dex `bin/dex serve config.dev.yaml`.\n\nInstall `sslyze`, easy to use SSL connection analyzer:\n\n```console\npip3 install sslyze\nsslyze 127.0.0.1:5556\n```\n\nIn Dex 2.37.0, TLS 1.0 and TLS 1.1 are enabled in addition to expected TLS 1.2 and TLS 1.3.\n```console\n * TLS 1.0 Cipher Suites:\n Attempted to connect using 80 cipher suites.\n\n The server accepted the following 6 cipher suites:\n TLS_RSA_WITH_AES_256_CBC_SHA 256 \n TLS_RSA_WITH_AES_128_CBC_SHA 128 \n TLS_RSA_WITH_3DES_EDE_CBC_SHA 168 \n TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 128 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 168 ECDH: prime256v1 (256 bits)\n\n The group of cipher suites supported by the server has the following properties:\n Forward Secrecy OK - Supported\n Legacy RC4 Algorithm OK - Not Supported\n\n\n * TLS 1.1 Cipher Suites:\n Attempted to connect using 80 cipher suites.\n\n The server accepted the following 6 cipher suites:\n TLS_RSA_WITH_AES_256_CBC_SHA 256 \n TLS_RSA_WITH_AES_128_CBC_SHA 128 \n TLS_RSA_WITH_3DES_EDE_CBC_SHA 168 \n TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 128 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 168 ECDH: prime256v1 (256 bits)\n\n The group of cipher suites supported by the server has the following properties:\n Forward Secrecy OK - Supported\n Legacy RC4 Algorithm OK - Not Supported\n\n\n * TLS 1.2 Cipher Suites:\n Attempted to connect using 156 cipher suites.\n\n The server accepted the following 11 cipher suites:\n TLS_RSA_WITH_AES_256_GCM_SHA384 256 \n TLS_RSA_WITH_AES_256_CBC_SHA 256 \n TLS_RSA_WITH_AES_128_GCM_SHA256 128 \n TLS_RSA_WITH_AES_128_CBC_SHA 128 \n TLS_RSA_WITH_3DES_EDE_CBC_SHA 168 \n TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 256 ECDH: X25519 (253 bits)\n TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 128 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 128 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 168 ECDH: prime256v1 (256 bits)\n\n The group of cipher suites supported by the server has the following properties:\n Forward Secrecy OK - Supported\n Legacy RC4 Algorithm OK - Not Supported\n\n\n * TLS 1.3 Cipher Suites:\n Attempted to connect using 5 cipher suites.\n\n The server accepted the following 3 cipher suites:\n TLS_CHACHA20_POLY1305_SHA256 256 ECDH: X25519 (253 bits)\n TLS_AES_256_GCM_SHA384 256 ECDH: X25519 (253 bits)\n TLS_AES_128_GCM_SHA256 128 ECDH: X25519 (253 bits)\n```\n\nIn Dex 2.36.0, TLS 1.0 and TLS 1.1 are disabled as expected.\n```console\n * TLS 1.0 Cipher Suites:\n Attempted to connect using 80 cipher suites; the server rejected all cipher suites.\n\n * TLS 1.1 Cipher Suites:\n Attempted to connect using 80 cipher suites; the server rejected all cipher suites.\n\n * TLS 1.2 Cipher Suites:\n Attempted to connect using 156 cipher suites.\n\n The server accepted the following 5 cipher suites:\n TLS_RSA_WITH_AES_256_GCM_SHA384 256 \n TLS_RSA_WITH_AES_128_GCM_SHA256 128 \n TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 256 ECDH: X25519 (253 bits)\n TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 128 ECDH: prime256v1 (256 bits)\n\n The group of cipher suites supported by the server has the following properties:\n Forward Secrecy OK - Supported\n Legacy RC4 Algorithm OK - Not Supported\n\n\n * TLS 1.3 Cipher Suites:\n Attempted to connect using 5 cipher suites.\n\n The server accepted the following 3 cipher suites:\n TLS_CHACHA20_POLY1305_SHA256 256 ECDH: X25519 (253 bits)\n TLS_AES_256_GCM_SHA384 256 ECDH: X25519 (253 bits)\n```\n\n### Impact\nTLS 1.0 and TLS 1.1 connections can be decrypted by the attacker, and hence decrypt the traffic to Dex.\n", + "details": "### Summary\n\nDex 2.37.0 is serving HTTPS with insecure TLS 1.0 and TLS 1.1.\n\n\n### Details\nWhile working on https://github.com/dexidp/dex/issues/2848 and implementing configurable TLS support, I noticed my changes did not have any effect in TLS config, so I started investigating. \n\nhttps://github.com/dexidp/dex/blob/70d7a2c7c1bb2646b1a540e49616cbc39622fb83/cmd/dex/serve.go#L425 is seemingly setting TLS 1.2 as minimum version, but the whole tlsConfig is ignored after \"TLS cert reloader\" was introduced in https://github.com/dexidp/dex/pull/2964. Configured cipher suites are not respected either, as seen on the output.\n\n### PoC\nBuild Dex, generate certs with `gencert.sh`, modify `config.dev.yaml` to run on https, using generated certs.\n\n```console\nissuer: http://127.0.0.1:5556/dex\n\nstorage:\n type: sqlite3\n config:\n file: dex.db\n\nweb:\n https: 127.0.0.1:5556\n tlsCert: examples/k8s/ssl/cert.pem\n tlsKey: examples/k8s/ssl/key.pem\n\n\n```\n\nRun dex `bin/dex serve config.dev.yaml`.\n\nInstall `sslyze`, easy to use SSL connection analyzer:\n\n```console\npip3 install sslyze\nsslyze 127.0.0.1:5556\n```\n\nIn Dex 2.37.0, TLS 1.0 and TLS 1.1 are enabled in addition to expected TLS 1.2 and TLS 1.3.\n```console\n * TLS 1.0 Cipher Suites:\n Attempted to connect using 80 cipher suites.\n\n The server accepted the following 6 cipher suites:\n TLS_RSA_WITH_AES_256_CBC_SHA 256 \n TLS_RSA_WITH_AES_128_CBC_SHA 128 \n TLS_RSA_WITH_3DES_EDE_CBC_SHA 168 \n TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 128 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 168 ECDH: prime256v1 (256 bits)\n\n The group of cipher suites supported by the server has the following properties:\n Forward Secrecy OK - Supported\n Legacy RC4 Algorithm OK - Not Supported\n\n\n * TLS 1.1 Cipher Suites:\n Attempted to connect using 80 cipher suites.\n\n The server accepted the following 6 cipher suites:\n TLS_RSA_WITH_AES_256_CBC_SHA 256 \n TLS_RSA_WITH_AES_128_CBC_SHA 128 \n TLS_RSA_WITH_3DES_EDE_CBC_SHA 168 \n TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 128 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 168 ECDH: prime256v1 (256 bits)\n\n The group of cipher suites supported by the server has the following properties:\n Forward Secrecy OK - Supported\n Legacy RC4 Algorithm OK - Not Supported\n\n\n * TLS 1.2 Cipher Suites:\n Attempted to connect using 156 cipher suites.\n\n The server accepted the following 11 cipher suites:\n TLS_RSA_WITH_AES_256_GCM_SHA384 256 \n TLS_RSA_WITH_AES_256_CBC_SHA 256 \n TLS_RSA_WITH_AES_128_GCM_SHA256 128 \n TLS_RSA_WITH_AES_128_CBC_SHA 128 \n TLS_RSA_WITH_3DES_EDE_CBC_SHA 168 \n TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 256 ECDH: X25519 (253 bits)\n TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 128 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 128 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 168 ECDH: prime256v1 (256 bits)\n\n The group of cipher suites supported by the server has the following properties:\n Forward Secrecy OK - Supported\n Legacy RC4 Algorithm OK - Not Supported\n\n\n * TLS 1.3 Cipher Suites:\n Attempted to connect using 5 cipher suites.\n\n The server accepted the following 3 cipher suites:\n TLS_CHACHA20_POLY1305_SHA256 256 ECDH: X25519 (253 bits)\n TLS_AES_256_GCM_SHA384 256 ECDH: X25519 (253 bits)\n TLS_AES_128_GCM_SHA256 128 ECDH: X25519 (253 bits)\n```\n\nIn Dex 2.36.0, TLS 1.0 and TLS 1.1 are disabled as expected.\n```console\n * TLS 1.0 Cipher Suites:\n Attempted to connect using 80 cipher suites; the server rejected all cipher suites.\n\n * TLS 1.1 Cipher Suites:\n Attempted to connect using 80 cipher suites; the server rejected all cipher suites.\n\n * TLS 1.2 Cipher Suites:\n Attempted to connect using 156 cipher suites.\n\n The server accepted the following 5 cipher suites:\n TLS_RSA_WITH_AES_256_GCM_SHA384 256 \n TLS_RSA_WITH_AES_128_GCM_SHA256 128 \n TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 256 ECDH: X25519 (253 bits)\n TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 256 ECDH: prime256v1 (256 bits)\n TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 128 ECDH: prime256v1 (256 bits)\n\n The group of cipher suites supported by the server has the following properties:\n Forward Secrecy OK - Supported\n Legacy RC4 Algorithm OK - Not Supported\n\n\n * TLS 1.3 Cipher Suites:\n Attempted to connect using 5 cipher suites.\n\n The server accepted the following 3 cipher suites:\n TLS_CHACHA20_POLY1305_SHA256 256 ECDH: X25519 (253 bits)\n TLS_AES_256_GCM_SHA384 256 ECDH: X25519 (253 bits)\n```\n\n### Impact\nTLS 1.0 and TLS 1.1 connections can be decrypted by the attacker, and hence decrypt the traffic to Dex.", "severity": [ { "type": "CVSS_V3", @@ -40,6 +40,25 @@ "versions": [ "2.37.0" ] + }, + { + "package": { + "ecosystem": "Go", + "name": "github.com/dexidp/dex" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "0.0.0-20240125115555-5bbdb4420254" + } + ] + } + ] } ], "references": [