CVE-2025-61727
Medium · 6.5CVSS
6.5
EPSS
0.3%
Published
Dec 3, 2025
CISA due date
—
Cloudanix analysis
A software flaw could allow an attacker to impersonate trusted websites and services by using a fraudulent security certificate, potentially enabling them to intercept sensitive user data.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Library
- Class
- Cryptographic Weakness
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A flaw in the TLS certificate validation logic fails to correctly apply 'excluded subdomain' name constraints from an intermediate certificate to wildcard Subject Alternative Names (SANs) in a leaf certificate. This allows a client using a vulnerable library to incorrectly trust a certificate that should be invalid. Consequently, an attacker can obtain a certificate for a domain they are explicitly forbidden from representing, breaking the certificate chain of trust and enabling man-in-the-middle attacks.
Why it matters to the business
This vulnerability allows attackers to impersonate trusted services, leading to man-in-the-middle (MitM) attacks. Such attacks can result in the interception and theft of sensitive data, including user credentials, personal information, and financial details. This can cause significant reputational damage, loss of customer trust, regulatory fines, and direct financial losses.
How an attack unfolds
An attacker first obtains a certificate from a Certificate Authority (CA) that includes a wildcard SAN (e.g., *.example.com). This certificate is part of a chain where an intermediate certificate explicitly excludes a subdomain (e.g., a name constraint forbidding 'secure.example.com'). The attacker then sets up a malicious server and uses it to intercept traffic intended for the excluded subdomain. When a client application built with a vulnerable library (like affected versions of Go) connects, it fails to properly validate the wildcard SAN against the exclusion constraint. The client incorrectly trusts the attacker's certificate, establishing an encrypted session that the attacker fully controls, allowing them to decrypt and manipulate all traffic.
How to fix it
Update all affected software to a patched version that correctly performs name constraint validation. For applications written in Go, recompile them using a Go version that includes the fix (commit 1296453960bac0fb5675853c40e3747e5237e16e or newer). For users of cert-manager, upgrade to version 1.12.14 or later. Any software that statically links the vulnerable Go crypto library must be re-linked against a patched version.
How to confirm the fix worked
To confirm the vulnerability is patched, attempt a TLS connection from the updated client to a test server configured with a certificate chain that specifically exploits this flaw. The chain should contain an intermediate CA with an excluded subdomain name constraint and a leaf certificate with a wildcard SAN that violates it. A patched client must reject the connection, while a vulnerable client would accept it. Additionally, verify the versions of all relevant deployed software (e.g., Go binaries, cert-manager instances) to ensure they meet or exceed the specified fixed versions.
Typical attack path
- Attacker identifies a target service that relies on a client application using a vulnerable cryptographic library for TLS connections.
- Attacker obtains a wildcard certificate from a CA that violates a name constraint defined higher up in the certificate chain.
- Attacker positions themselves to intercept network traffic between the client and the legitimate service (e.g., via DNS poisoning or network compromise).
- The client attempts to connect to the legitimate service, but is redirected to the attacker's server.
- The vulnerable client receives the attacker's malicious certificate and, due to the flaw, fails to reject it, thus validating it as trusted.
- The client establishes a TLS session with the attacker's server, allowing the attacker to intercept, read, and modify all communications.
How to detect it
Detecting past exploitation is challenging, as a successful attack would appear as valid TLS traffic. Proactive detection should focus on identifying prerequisites. Monitor Certificate Transparency (CT) logs for newly issued wildcard certificates for your domains that seem suspicious or unauthorized. Review internal CA logs for any certificates that may have been issued in violation of established name constraints. While difficult, analyzing historical TLS traffic for connections to known-bad infrastructure using certificates that match this pattern may yield results, but this is a low-fidelity signal.
What your security team should do
- Identify all applications and services built with vulnerable versions of the Go language or using affected versions of cert-manager, prioritizing those that handle sensitive data.
- Apply patches immediately by upgrading Go compilers and recompiling applications, and by updating cert-manager instances to version 1.12.14 or newer.
- Review Certificate Transparency (CT) logs for certificates issued to your domains to check for any anomalous wildcard certificates that could potentially be used in such an attack.
- Consider implementing certificate pinning for high-value applications as a defense-in-depth measure against certificate-based impersonation attacks, though this does not replace the need to patch.
The record
An excluded subdomain constraint in a certificate chain does not restrict the usage of wildcard SANs in the leaf certificate. For example a constraint that excludes the subdomain test.example.com does not prevent a leaf certificate from claiming the SAN *.example.com.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | stdlib | 0 | 1.24.11 |
| Bitnami | golang | 0 | 1.24.11 |
| Chainguard | actions-runner-controller-fips | 0 | 0.13.0-r4 |
| Chainguard | actions-runner-controller-fips-compat | 0 | 0.13.0-r4 |
| Chainguard | amazon-cloudwatch-agent-amazon-cloudwatch-agent-config-wizard-fips | 0 | 1.300062.0-r2 |
| Chainguard | amazon-cloudwatch-agent-config-downloader-fips | 0 | 1.300062.0-r2 |
| Chainguard | amazon-cloudwatch-agent-config-translator-fips | 0 | 1.300062.0-r2 |
| Chainguard | amazon-cloudwatch-agent-fips | 0 | 1.300062.0-r2 |
| Chainguard | amazon-cloudwatch-agent-operator-fips | 0 | 3.3.0-r3 |
| Chainguard | amazon-cloudwatch-agent-operator-fips-compat | 0 | 3.3.0-r3 |
| Chainguard | amazon-cloudwatch-agent-start-amazon-cloudwatch-agent-fips | 0 | 1.300062.0-r2 |
| Chainguard | amazon-vpc-cni-plugins-fips | 0 | 1.3_git20251112-r2 |
| Chainguard | apm-server-fips-8.17 | 0 | 8.17.10-r3 |
| Chainguard | apm-server-fips-8.17-compat | 0 | 8.17.10-r3 |
| Chainguard | apm-server-fips-8.18 | 0 | 8.18.8-r2 |
| Chainguard | apm-server-fips-8.18-compat | 0 | 8.18.8-r2 |
| Chainguard | argo-cd-fips-2.13-repo-server | 0 | 2.13.9-r5 |
| Chainguard | argo-cd-fips-3.0 | 0 | 3.0.20-r7 |
| Chainguard | argo-cd-fips-3.0-compat | 0 | 3.0.20-r7 |
| Chainguard | argo-cd-fips-3.0-iamguarded-compat | 0 | 3.0.20-r7 |
| Chainguard | argo-cd-fips-3.0-repo-server | 0 | 3.0.20-r7 |
| Chainguard | argo-cd-fips-3.2 | 0 | 3.2.1-r1 |
| Chainguard | argo-cd-fips-3.2-compat | 0 | 3.2.1-r1 |
| Chainguard | argo-cd-fips-3.2-iamguarded-compat | 0 | 3.2.1-r1 |
| Chainguard | argo-cd-fips-3.2-repo-server | 0 | 3.2.1-r1 |
| Chainguard | argo-rollouts-fips | 0 | 1.8.3-r7 |
| Chainguard | auditbeat-7 | 0 | 7.17.29-r7 |
| Chainguard | authservice-fips | 0 | 1.1.4-r1 |
| Chainguard | authservice-fips-compat | 0 | 1.1.4-r1 |
| Chainguard | aws-application-networking-k8s-fips | 0 | 1.1.7-r2 |
| Chainguard | aws-application-networking-k8s-fips-compat | 0 | 1.1.7-r2 |
| Chainguard | aws-ebs-csi-driver-fips-1.49 | 0 | 1.49.2-r1 |
| Chainguard | aws-ebs-csi-driver-fips-1.50 | 0 | 1.50.3-r1 |
| Chainguard | aws-ebs-csi-driver-fips-1.53 | 0 | 1.53.0-r1 |
| Chainguard | aws-efs-csi-driver-fips | 0 | 2.1.15-r1 |
| Chainguard | aws-eks-pod-identity-agent-fips | 0 | 0.1.36-r1 |
| Chainguard | aws-flb-cloudwatch-compat-fips | 0 | 1.9.4-r15 |
| Chainguard | aws-flb-cloudwatch-fips | 0 | 1.9.4-r15 |
| Chainguard | aws-flb-firehose-compat-fips | 0 | 1.7.2-r16 |
| Chainguard | aws-flb-firehose-compat-fips | 0 | 1.7.2-r15 |
| Chainguard | aws-flb-firehose-fips | 0 | 1.7.2-r16 |
| Chainguard | aws-flb-firehose-fips | 0 | 1.7.2-r15 |
| Chainguard | aws-iam-authenticator-fips | 0 | 0.7.9-r1 |
| Chainguard | aws-load-balancer-controller-fips | 0 | 2.16.0-r2 |
| Chainguard | aws-nuke-fips | 0 | 3.62.0-r1 |
| Chainguard | aws-privateca-issuer-compat-fips | 0 | 1.7.1-r1 |
| Chainguard | aws-privateca-issuer-fips | 0 | 1.7.1-r1 |
| Chainguard | aws-signer-notation-plugin-fips | 0 | 1.0.2292-r4 |
| Chainguard | aws-sigv4-proxy-fips | 0 | 1.10-r4 |
| Chainguard | azure-service-operator-fips | 0 | 2.17.0-r0 |
| Chainguard | azuredisk-csi-fips-1.31 | 0 | 1.31.12-r5 |
| Chainguard | azuredisk-csi-fips-1.32 | 0 | 1.32.11-r5 |
| Chainguard | azurefile-csi-fips-1.30 | 0 | 1.30.10-r9 |
| Chainguard | azurefile-csi-fips-1.30-compat | 0 | 1.30.10-r9 |
| Chainguard | azurefile-csi-fips-1.32 | 0 | 1.32.8-r2 |
| Chainguard | azurefile-csi-fips-1.32-compat | 0 | 1.32.8-r2 |
| Chainguard | bank-vaults-fips | 0 | 1.20.4-r35 |
| Chainguard | bank-vaults-template-fips | 0 | 1.20.4-r35 |
| Chainguard | boring-registry-fips | 0 | 0.16.6-r4 |
| Chainguard | cass-operator-compat-fips | 0 | 1.28.0-r3 |
| Chainguard | cass-operator-fips | 0 | 1.28.0-r3 |
| Chainguard | ceph-csi-operator-compat-fips | 0 | 0.4.1-r1 |
| Chainguard | ceph-csi-operator-fips | 0 | 0.4.1-r1 |
| Chainguard | cert-exporter-fips | 0 | 2.17.0-r2 |
| Chainguard | cert-manager-acmesolver-fips-1.17 | 0 | 1.17.4-r5 |
| Chainguard | cert-manager-acmesolver-fips-1.18 | 0 | 1.18.3-r2 |
| Chainguard | cert-manager-cainjector-fips-1.17 | 0 | 1.17.4-r5 |
| Chainguard | cert-manager-cainjector-fips-1.18 | 0 | 1.18.3-r2 |
| Chainguard | cert-manager-controller-fips-1.17 | 0 | 1.17.4-r5 |
| Chainguard | cert-manager-controller-fips-1.18 | 0 | 1.18.3-r2 |
| Chainguard | cert-manager-csi-driver-fips | 0 | 0.12.0-r0 |
| Chainguard | cert-manager-fips-1.17 | 0 | 1.17.4-r5 |
| Chainguard | cert-manager-fips-1.18 | 0 | 1.18.4-r0 |
| Chainguard | cert-manager-google-cas-issuer-fips | 0 | 0.10.1-r2 |
| Chainguard | cert-manager-startupapicheck-fips-1.17 | 0 | 1.17.4-r5 |
| Chainguard | cert-manager-startupapicheck-fips-1.18 | 0 | 1.18.3-r2 |
| Chainguard | cert-manager-webhook-fips-1.17 | 0 | 1.17.4-r5 |
| Chainguard | cert-manager-webhook-fips-1.18 | 0 | 1.18.4-r0 |
| Chainguard | cert-manager-webhook-pdns | 0 | 2.5.3-r3 |
| Chainguard | cfssl-bundle-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-certinfo-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-fips-cfssl-bundle-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-fips-cfssl-certinfo-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-fips-cfssl-newkey-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-fips-cfssl-scan-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-fips-cfssljson-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-fips-mkbundle-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-fips-multirootca-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-json-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-mkbundle-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-multirootca-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-newkey-fips | 0 | 1.6.5-r18 |
| Chainguard | cfssl-scan-fips | 0 | 1.6.5-r18 |
| Chainguard | chartmuseum-fips | 0 | 0.16.3-r10 |
| Chainguard | chisel | 0 | 1.11.3-r3 |
| Chainguard | chisel-compat | 0 | 1.11.3-r3 |
| Chainguard | chisel-fips | 0 | 1.11.3-r3 |
| Chainguard | cilium-1.14 | 0 | 1.14.19-r36 |
| Chainguard | cilium-1.14-clustermesh-apiserver | 0 | 1.14.19-r36 |
| Chainguard | cilium-1.14-container-init | 0 | 1.14.19-r36 |
| Chainguard | cilium-1.14-container-init-compat | 0 | 1.14.19-r36 |
| Chainguard | cilium-1.14-hubble-relay | 0 | 1.14.19-r36 |
| Chainguard | cilium-1.14-iptables | 0 | 1.14.19-r36 |
| Chainguard | cilium-1.14-operator-aws | 0 | 1.14.19-r36 |
| Chainguard | cilium-1.14-operator-generic | 0 | 1.14.19-r36 |
| Chainguard | cilium-envoy-fips-1.15 | 0 | 1.15.19-r7 |
| Chainguard | cilium-envoy-fips-1.16 | 0 | 1.16.17-r1 |
| Chainguard | cilium-envoy-fips-1.17 | 0 | 1.17.10-r1 |
| Chainguard | cilium-envoy-fips-1.18 | 0 | 1.18.4-r1 |
| Chainguard | cilium-fips-1.14 | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-clustermesh-apiserver | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-compat | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-container-init | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-container-init-compat | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-host-utils | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-hubble-relay | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-iptables | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-operator-aws | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-operator-azure | 0 | 1.14.19-r59 |
| Chainguard | cilium-fips-1.14-operator-generic | 0 | 1.14.19-r59 |
| Chainguard | cinder-csi-plugin-fips | 0 | 1.34.1-r2 |
| Chainguard | cloud-provider-aws-fips-1.34 | 0 | 1.34.1-r3 |
| Chainguard | cloud-provider-aws-fips-1.34-cloud-controller-manager | 0 | 1.34.1-r3 |
| Chainguard | cloud-provider-aws-fips-1.34-ecr-credential-provider | 0 | 1.34.1-r3 |
| Chainguard | cloud-provider-azure-cloud-controller-manager-fips-1.27 | 0 | 1.27.21-r16 |
| Chainguard | cloud-provider-azure-cloud-controller-manager-fips-1.29 | 0 | 1.29.15-r6 |
| Chainguard | cloud-provider-azure-cloud-controller-manager-fips-1.30 | 0 | 1.30.15-r3 |
| Chainguard | cloud-provider-azure-cloud-controller-manager-fips-1.31 | 0 | 1.31.12-r2 |
| Chainguard | cloud-provider-azure-cloud-controller-manager-fips-1.33 | 0 | 1.33.6-r1 |
| Chainguard | cloud-provider-azure-cloud-controller-manager-fips-1.34 | 0 | 1.34.3-r2 |
| Chainguard | cloud-provider-azure-cloud-node-manager-fips-1.27 | 0 | 1.27.21-r16 |
| Chainguard | cloud-provider-azure-cloud-node-manager-fips-1.29 | 0 | 1.29.15-r6 |
| Chainguard | cloud-provider-azure-cloud-node-manager-fips-1.30 | 0 | 1.30.15-r3 |
| Chainguard | cloud-provider-azure-cloud-node-manager-fips-1.31 | 0 | 1.31.12-r2 |
| Chainguard | cloud-provider-azure-cloud-node-manager-fips-1.33 | 0 | 1.33.6-r1 |
| Chainguard | cloud-provider-azure-cloud-node-manager-fips-1.34 | 0 | 1.34.3-r2 |
| Chainguard | cloud-provider-azure-fips-1.27 | 0 | 1.27.21-r16 |
| Chainguard | cloud-provider-azure-fips-1.29 | 0 | 1.29.15-r6 |
| Chainguard | cloud-provider-azure-fips-1.30 | 0 | 1.30.15-r3 |
| Chainguard | cloud-provider-azure-fips-1.31 | 0 | 1.31.12-r2 |
| Chainguard | cloud-provider-azure-fips-1.33 | 0 | 1.33.6-r1 |
| Chainguard | cloud-provider-azure-fips-1.34 | 0 | 1.34.3-r2 |
| Chainguard | cloudbeat-fips-8.17 | 0 | 8.17.10-r6 |
| Chainguard | cloudbeat-fips-8.18 | 0 | 8.18.8-r5 |
| Chainguard | cloudbeat-fips-8.19 | 0 | 8.19.8-r1 |
| Chainguard | cloudbeat-fips-9.1 | 0 | 9.1.8-r1 |
| Chainguard | cloudnative-pg-fips | 0 | 1.27.1-r3 |
| Chainguard | cloudnative-pg-fips-plugins | 0 | 1.27.1-r3 |
| Chainguard | cloudprober-fips | 0 | 0.14.1-r4 |
| Chainguard | cluster-api-aws-controller-fips | 0 | 2.10.0-r1 |
| Chainguard | cluster-api-aws-controller-fips-compat | 0 | 2.10.0-r1 |
| Chainguard | cluster-api-fips-1.11 | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-capd-manager | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-capd-manager-compat | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-clusterctl | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-clusterctl-compat | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-controller | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-controller-compat | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-kubeadm-bootstrap-controller | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-kubeadm-bootstrap-controller-compat | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-kubeadm-control-plane-controller | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-fips-1.11-kubeadm-control-plane-controller-compat | 0 | 1.11.3-r2 |
| Chainguard | cluster-api-gcp-controller-fips | 0 | 1.10.0-r6 |
| Chainguard | cluster-api-gcp-controller-fips-compat | 0 | 1.10.0-r6 |
| Chainguard | cluster-autoscaler-fips-1.31 | 0 | 1.31.5-r3 |
| Chainguard | cluster-autoscaler-fips-1.31-compat | 0 | 1.31.5-r3 |
| Chainguard | cluster-autoscaler-fips-1.32 | 0 | 1.32.5-r1 |
| Chainguard | cluster-autoscaler-fips-1.32-compat | 0 | 1.32.5-r1 |
| Chainguard | cluster-proportional-autoscaler-fips | 0 | 1.10.2-r8 |
| Chainguard | configmap-reload-fips | 0 | 0.15.0-r5 |
| Chainguard | configmap-reload-fips-0.11 | 0 | 0.11.1-r21 |
| Chainguard | configmap-reload-fips-0.12 | 0 | 0.12.0-r20 |
| Chainguard | conftest-fips | 0 | 0.65.0-r1 |
| Chainguard | consul-1.20 | 0 | 1.20.6-r9 |
| Chainguard | consul-1.20-oci-entrypoint | 0 | 1.20.6-r9 |
| Chainguard | consul-1.20-oci-entrypoint-compat | 0 | 1.20.6-r9 |
| Chainguard | consul-1.21 | 0 | 1.21.5-r4 |
| Chainguard | consul-1.21-oci-entrypoint | 0 | 1.21.5-r4 |
| Chainguard | consul-1.21-oci-entrypoint-compat | 0 | 1.21.5-r4 |
| Chainguard | consul-1.22 | 0 | 1.22.1-r1 |
| Chainguard | consul-1.22-oci-entrypoint | 0 | 1.22.1-r1 |
| Chainguard | consul-1.22-oci-entrypoint-compat | 0 | 1.22.1-r1 |
| Chainguard | consul-fips-1.19 | 0 | 1.19.2-r44 |
| Chainguard | consul-fips-1.19-oci-entrypoint | 0 | 1.19.2-r44 |
| Chainguard | consul-fips-1.19-oci-entrypoint-compat | 0 | 1.19.2-r44 |
| Chainguard | consul-k8s-fips-1.3 | 0 | 1.3.9-r21 |
| Chainguard | consul-k8s-fips-1.3-cli | 0 | 1.3.9-r21 |
| Chainguard | consul-k8s-fips-1.4 | 0 | 1.4.10-r9 |
| Chainguard | consul-k8s-fips-1.4-cli | 0 | 1.4.10-r9 |
| Chainguard | consul-k8s-fips-1.5 | 0 | 1.5.9-r9 |
| Chainguard | consul-k8s-fips-1.5-cli | 0 | 1.5.9-r9 |
| Chainguard | consul-k8s-fips-1.6 | 0 | 1.6.10-r4 |
| Chainguard | consul-k8s-fips-1.6-cli | 0 | 1.6.10-r4 |
| Chainguard | contour-fips-1.30 | 0 | 1.30.5-r2 |
| Chainguard | contour-fips-1.30-bitnami-compat | 0 | 1.30.5-r2 |
| Chainguard | contour-fips-1.30-compat | 0 | 1.30.5-r2 |
| Chainguard | contour-fips-1.30-iamguarded-compat | 0 | 1.30.5-r2 |
| Chainguard | contour-fips-1.31 | 0 | 1.31.2-r2 |
| Chainguard | contour-fips-1.32 | 0 | 1.32.1-r2 |
Related vulnerabilities
- CVE-2025-68121 During session resumption in crypto/tls, if the underlying Config has its ClientCAs or… Also affects stdlib
- CVE-2025-22873 It was possible to improperly access the parent directory of an os.Root by opening a… Also affects stdlib
- GO-2026-4403 Improper access to parent directory of root in os Also affects stdlib
- CVE-2025-61726 The net/url package does not set a limit on the number of query parameters in a query. Also affects stdlib
- CVE-2025-61728 archive/zip uses a super-linear file name indexing algorithm that is invoked the first… Also affects stdlib
- CVE-2025-61730 During the TLS 1.3 handshake if multiple messages are sent in records that span… Also affects stdlib
- CVE-2025-61729 Within HostnameError.Error(), when constructing an error string, there is no limit to the… Also affects stdlib
- CVE-2025-61725 The ParseAddress function constructs domain-literal address components through repeated… Also affects stdlib