Cloudanix VulnDB

CVE-2024-24783

Medium · 5.9

CVSS

5.9

EPSS

0.7%

Published

Mar 5, 2024

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A flaw in a common programming language allows an attacker to crash applications by sending a malicious digital certificate, making the service unavailable.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
High
Impact
Data Tampering
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

A vulnerability exists in Go's `crypto/tls` package where processing a specially crafted TLS certificate chain can cause a panic. Specifically, if a certificate in the chain uses an unknown public key algorithm, the `Certificate.Verify` function will panic, leading to an unhandled exception that terminates the entire process.

Why it matters to the business

This vulnerability can be exploited to cause a Denial of Service (DoS) against applications written in Go. Any service that acts as a TLS client (e.g., connecting to external APIs) or a TLS server configured for mutual authentication (mTLS) is at risk. Successful exploitation will crash the service, leading to downtime, service unavailability, and potential disruption of dependent systems. Repeated attacks can prevent a service from running, impacting reliability and customer trust.

How an attack unfolds

An attacker can exploit this vulnerability by presenting a malicious TLS certificate to a vulnerable Go application during a TLS handshake. For a server-side vulnerability (where the Go application is a server configured for mTLS), the attacker acts as a client and sends a crafted client certificate. The server attempts to verify this certificate, encounters the unknown public key algorithm, and panics. For a client-side vulnerability, the attacker must control the server the Go application connects to (e.g., via DNS hijacking or by owning the endpoint). When the Go client connects, the attacker's server presents a crafted server certificate, causing the client to panic and crash upon verification.

How to fix it

To remediate this vulnerability, you must upgrade the Go toolchain to a patched version (e.g., Go 1.22.1 or Go 1.21.8 and later) and recompile your applications. Simply updating the Go runtime on a system is not sufficient; the binaries themselves must be rebuilt with the fixed standard library.

How to confirm the fix worked

To validate that an application is no longer vulnerable, first verify the Go version used to build the binary. You can use the command `go version -m /path/to/your/binary` to check the build information. Ensure the reported version is a patched one. Additionally, you can perform a security test by attempting to connect to the service (or have the client connect to a test server) using a certificate with an invalid public key algorithm. A patched application should reject the connection gracefully with an error, while a vulnerable application will crash.

Typical attack path

  1. The attacker crafts a X.509 certificate that specifies an unknown or unsupported public key algorithm.
  2. The attacker identifies a target Go application that either acts as a TLS client or is a TLS server configured to verify client certificates.
  3. The attacker positions themselves to present the certificate to the target. For a server target, this involves initiating a TLS handshake. For a client target, this involves intercepting its connection or controlling its destination endpoint.
  4. The malicious certificate is sent to the victim application as part of the TLS handshake.
  5. The Go application's `crypto/tls` library attempts to parse and verify the certificate.
  6. The verification process fails on the unknown algorithm, triggering a panic that crashes the application.
  7. The application becomes unavailable, resulting in a Denial of Service.

How to detect it

A successful exploit will cause the target Go application to crash. To detect exploitation, monitor application and system logs for unexpected process terminations and panic stack traces. A panic originating from the `crypto/tls` package during certificate verification is a strong indicator of an attempted or successful exploit. Monitor application availability and restart counts; a sudden spike in restarts for a Go-based service could indicate repeated exploitation attempts.

  • log_message_pattern: panic: crypto/tls: unknown public key algorithm
  • log_message_pattern: panic: runtime error: invalid memory address or nil pointer dereference

What your security team should do

  • Identify all applications built with Go and use tools like `go version -m <binary>` to determine which are built with a vulnerable version of the compiler.
  • Prioritize patching and redeploying publicly exposed services or services that use mutual TLS (mTLS) for authentication, as they are the most likely targets.
  • Update all build pipelines and developer environments to use a patched version of the Go compiler to ensure no new vulnerable software is created.

The record

Verifying a certificate chain which contains a certificate with an unknown public key algorithm will cause Certificate.Verify to panic. This affects all crypto/tls clients, and servers that set Config.ClientAuth to VerifyClientCertIfGiven or RequireAndVerifyClientCert. The default behavior is for TLS servers to not verify client certificates.

Affected packages

Ecosystem Package Introduced Fixed
Go stdlib 0 1.21.8
AlmaLinux:8 aardvark-dns 0 2:1.10.0-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 aardvark-dns 0 2:1.10.0-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 aardvark-dns 0 2:1.10.0-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 buildah 0 2:1.33.8-4.module_el8.10.0+3876+e55593a8
AlmaLinux:8 buildah-tests 0 2:1.33.8-4.module_el8.10.0+3876+e55593a8
AlmaLinux:8 cockpit-podman 0 84.1-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 cockpit-podman 0 84.1-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 conmon 0 3:2.1.10-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 conmon 0 3:2.1.10-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 conmon 0 3:2.1.10-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 container-selinux 0 2:2.229.0-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 containernetworking-plugins 0 1:1.4.0-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 containers-common 0 2:1-82.module_el8.10.0+3876+e55593a8
AlmaLinux:8 crit 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 crit 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 crit 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 criu 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 criu 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 criu-devel 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 criu-devel 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 criu-libs 0 3.18-5.module_el8.10.0+3845+87b84552
AlmaLinux:8 criu-libs 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 crun 0 1.14.3-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 crun 0 1.14.3-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 delve 0 1.21.2-3.module_el8.10.0+3760+4dd778f9
AlmaLinux:8 fuse-overlayfs 0 1.13-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 fuse-overlayfs 0 1.13-1.module_el8.10.0+3859+6ae70a0e
AlmaLinux:8 git-lfs 0 3.4.1-2.el8_10
AlmaLinux:8 go-toolset 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-bin 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-docs 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-misc 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-src 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 golang-tests 0 1.21.9-1.module_el8.10.0+3840+edaca3c3
AlmaLinux:8 libslirp 0 4.4.0-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 libslirp 0 4.4.0-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 libslirp 0 4.4.0-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 libslirp-devel 0 4.4.0-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 libslirp-devel 0 4.4.0-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 libslirp-devel 0 4.4.0-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 netavark 0 2:1.10.3-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 netavark 0 2:1.10.3-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 netavark 0 2:1.10.3-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 oci-seccomp-bpf-hook 0 1.2.10-1.module_el8.10.0+3792+03eaed9c
AlmaLinux:8 oci-seccomp-bpf-hook 0 1.2.10-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-catatonit 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-catatonit 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-docker 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-docker 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-gvproxy 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-gvproxy 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-plugins 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-plugins 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-remote 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-remote 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 podman-tests 0 4:4.9.4-12.module_el8.10.0+3876+e55593a8
AlmaLinux:8 podman-tests 0 4:4.9.4-13.module_el8.10.0+3898+7a25cb1a
AlmaLinux:8 python3-criu 0 3.18-5.module_el8.10.0+3876+e55593a8
AlmaLinux:8 python3-criu 0 3.18-5.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 python3-podman 0 4.9.0-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 runc 0 1:1.1.12-4.module_el8.10.0+3876+e55593a8
AlmaLinux:8 skopeo 0 2:1.14.5-3.module_el8.10.0+3876+e55593a8
AlmaLinux:8 skopeo-tests 0 2:1.14.5-3.module_el8.10.0+3876+e55593a8
AlmaLinux:8 slirp4netns 0 1.2.3-1.module_el8.10.0+3845+87b84552
AlmaLinux:8 slirp4netns 0 1.2.3-1.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 slirp4netns 0 1.2.3-1.module_el8.10.0+3876+e55593a8
AlmaLinux:8 toolbox 0 0.0.99.5-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 toolbox 0 0.0.99.5-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 toolbox 0 0.0.99.5-2.module_el8.10.0+3876+e55593a8
AlmaLinux:8 toolbox-tests 0 0.0.99.5-2.module_el8.10.0+3845+87b84552
AlmaLinux:8 toolbox-tests 0 0.0.99.5-2.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 udica 0 0.2.6-21.module_el8.10.0+3858+6ad51f9f
AlmaLinux:8 udica 0 0.2.6-21.module_el8.10.0+3876+e55593a8
AlmaLinux:9 buildah 0 2:1.33.7-4.el9_4
AlmaLinux:9 buildah-tests 0 2:1.33.7-4.el9_4
AlmaLinux:9 containernetworking-plugins 0 1:1.4.0-5.el9_4
AlmaLinux:9 git-lfs 0 3.4.1-2.el9_4
AlmaLinux:9 go-toolset 0 1.21.9-2.el9_4
AlmaLinux:9 golang 0 1.21.9-2.el9_4
AlmaLinux:9 golang-bin 0 1.21.9-2.el9_4
AlmaLinux:9 golang-docs 0 1.21.9-2.el9_4
AlmaLinux:9 golang-misc 0 1.21.9-2.el9_4
AlmaLinux:9 golang-src 0 1.21.9-2.el9_4
AlmaLinux:9 golang-tests 0 1.21.9-2.el9_4
AlmaLinux:9 gvisor-tap-vsock 0 6:0.7.3-5.el9_4.alma.1
AlmaLinux:9 podman 0 4:4.9.4-10.el9_4
AlmaLinux:9 podman-docker 0 4:4.9.4-10.el9_4
AlmaLinux:9 podman-plugins 0 4:4.9.4-10.el9_4
AlmaLinux:9 podman-remote 0 4:4.9.4-10.el9_4
AlmaLinux:9 podman-tests 0 4:4.9.4-10.el9_4
AlmaLinux:9 runc 0 4:1.1.12-4.el9_4
AlmaLinux:9 skopeo 0 2:1.14.5-1.el9_4
AlmaLinux:9 skopeo-tests 0 2:1.14.5-1.el9_4
Bitnami golang 0 1.21.8
Chainguard actions-runner-controller 0 0.8.3-r1
Chainguard actions-runner-controller-compat 0 0.8.3-r1
Chainguard amass 0 4.2.0-r4
Chainguard argo-cd-2.7 0 2.7.17-r1
Chainguard argo-cd-2.7-compat 0 2.7.17-r1
Chainguard argo-cd-2.7-repo-server 0 2.7.17-r1
Chainguard argo-cd-fips-2.10 0 2.10.2-r1
Chainguard argo-cd-fips-2.10-compat 0 2.10.2-r1
Chainguard argo-cd-fips-2.10-repo-server 0 2.10.2-r1
Chainguard argo-cd-fips-2.9 0 2.9.6-r1
Chainguard argo-cd-fips-2.9-compat 0 2.9.6-r1
Chainguard argo-cd-fips-2.9-repo-server 0 2.9.6-r1
Chainguard argo-workflow-cli 0 3.6.5-r2
Chainguard argo-workflow-cli-fips 0 3.5.5-r1
Chainguard argo-workflow-controller 0 3.6.5-r2
Chainguard argo-workflow-controller-compat 0 3.6.5-r2
Chainguard argo-workflow-controller-compat-fips 0 3.5.5-r1
Chainguard argo-workflow-controller-fips 0 3.5.5-r1
Chainguard argo-workflow-executor 0 3.6.5-r2
Chainguard argo-workflow-executor-compat 0 3.6.5-r2
Chainguard argo-workflow-executor-compat-fips 0 3.5.5-r1
Chainguard argo-workflow-executor-fips 0 3.5.5-r1
Chainguard argo-workflows 0 3.6.5-r2
Chainguard argo-workflows-fips 0 3.5.5-r1
Chainguard argo-workflows-known-hosts 0 3.6.5-r2
Chainguard argo-workflows-known-hosts-fips 0 3.5.5-r1
Chainguard argo-workflows-ui 0 3.6.5-r2
Chainguard atlantis-fips 0 0.33.0-r6
Chainguard aws-ebs-csi-driver 0 1.28.0-r1
Chainguard aws-ebs-csi-driver-1.18 0 1.18.0-r11
Chainguard aws-ebs-csi-driver-1.19 0 1.19.0-r11
Chainguard aws-ebs-csi-driver-fips 0 1.28.0-r1
Chainguard aws-efs-csi-driver 0 1.7.6-r1
Chainguard aws-efs-csi-driver-fips 0 1.7.0-r4
Chainguard aws-efs-csi-driver-fips-1.6 0 1.6.0-r4
Chainguard aws-flb-cloudwatch 0 1.9.4-r7
Chainguard aws-flb-cloudwatch-compat 0 1.9.4-r7
Chainguard aws-flb-firehose 0 1.7.2-r7
Chainguard aws-flb-firehose-compat 0 1.7.2-r7
Chainguard aws-flb-kinesis 0 1.10.2-r7
Chainguard aws-flb-kinesis-compat 0 1.10.2-r7
Chainguard aws-load-balancer-controller 0 2.7.1-r1
Chainguard aws-load-balancer-controller-2.4.5 0 2.4.5-r9
Chainguard aws-load-balancer-controller-2.5 0 2.5.4-r2
Chainguard aws-load-balancer-controller-compat 0 2.7.1-r1
Chainguard aws-load-balancer-controller-compat-2.4.5 0 2.5.4-r2
Chainguard aws-load-balancer-controller-fips 0 2.7.1-r1
Chainguard azure-aad-pod-identity-mic 0 1.8.17-r5
Chainguard azure-aad-pod-identity-nmi 0 1.8.17-r5
Chainguard bank-vaults-fips 0 1.20.4-r5
Chainguard bank-vaults-template-fips 0 1.20.4-r5
Chainguard bazelisk 0 1.19.0-r1
Chainguard bazelisk-default 0 1.19.0-r1
Chainguard bom 0 0.6.0-r1
Chainguard boring-registry-fips 0 0.13.2-r1
Chainguard buildctl 0 0.13.1-r2
Chainguard buildkitd 0 0.13.1-r2
Chainguard caddy 0 2.7.6-r3
Chainguard caddy-man 0 2.7.6-r3
Chainguard caddy-src 0 2.7.6-r3
Chainguard cadvisor 0 0.49.1-r3
Chainguard cadvisor-compat 0 0.49.1-r3
Chainguard calico 0 3.27.2-r2
Chainguard calico-apiserver 0 3.27.2-r2
Chainguard calico-app-policy 0 3.27.2-r2
Chainguard calico-cni 0 3.27.2-r2
Chainguard calico-cni-compat 0 3.27.2-r2
Chainguard calico-cni-fips-compat 0 3.27.2-r1
Chainguard calico-felix 0 3.27.2-r2
Chainguard calico-fips 0 3.27.2-r1
Chainguard calico-fips-apiserver 0 3.27.2-r1
Chainguard calico-fips-app-policy 0 3.27.2-r1
Chainguard calico-fips-cni 0 3.27.2-r1
Chainguard calico-fips-felix 0 3.27.2-r1
Chainguard calico-fips-key-cert-provisioner 0 3.27.2-r1
Chainguard calico-fips-kube-controllers 0 3.27.2-r1
Chainguard calico-fips-node 0 3.27.2-r1
Chainguard calico-fips-pod2daemon 0 3.27.2-r1
Chainguard calico-fips-typha-client 0 3.27.2-r1
Chainguard calico-fips-typhad 0 3.27.2-r1
Chainguard calico-key-cert-provisioner 0 3.27.2-r2
Chainguard calico-kube-controllers 0 3.27.2-r2
Chainguard calico-node 0 3.27.2-r2
Chainguard calico-pod2daemon 0 3.27.2-r2
Chainguard calico-pod2daemon-flexvol-compat 0 3.27.2-r2
Chainguard calico-typha-client 0 3.27.2-r2
Chainguard calico-typhad 0 3.27.2-r2
Chainguard calicoctl 0 3.27.2-r2
Chainguard calicoctl-fips 0 3.27.2-r1
Chainguard capslock 0 0.2.1-r1
Chainguard cass-operator 0 1.18.2-r4
Chainguard cass-operator-compat 0 1.18.2-r4
Chainguard cass-operator-compat-fips 0 1.18.2-r3
Chainguard cass-operator-config 0 1.18.2-r4
Chainguard cass-operator-fips 0 1.18.2-r3
Chainguard cass-operator-fips-no-pvc-delete 0 1.18.2-r4
Chainguard cass-operator-fips-no-pvc-delete-compat 0 1.18.2-r4
Chainguard cert-exporter 0 2.12.0-r1
Chainguard cert-exporter-fips 0 2.12.0-r1
Chainguard cert-manager-fips-1.13 0 1.13.4-r1
Chainguard cert-manager-fips-1.13-acmesolver 0 1.13.4-r1
Chainguard cert-manager-fips-1.13-cainjector 0 1.13.4-r1

Related vulnerabilities