CVE-2024-29887: Serverpod client Serverpod Client Accepts Any Certificate Vulnerability

HIGH
Advisory Identifier: GHSA-h6x7-r5rg-x5fw
CVSS 7.4
CWE-295
Published
Advisory Summary

CVE-2024-29887 is a HIGH (CVSS 7.4) serverpod client accepts any certificate vulnerability (CWE-295: Improper Certificate Validation) affecting Serverpod client libraries in the Pub ecosystem. The issue involves serverpod client accepts any certificate. Remediation is available by upgrading affected packages to version 1.2.6.

CVE-2024-29887 at a Glance

CVE Identifier CVE-2024-29887
GHSA Identifier GHSA-h6x7-r5rg-x5fw
Severity HIGH
CVSS v3.1 Base Score 7.4
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Serverpod client
Package Ecosystem Pub
Published Date
Last Updated

Security Impact

CVSS: 7.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-29887

To remediate this vulnerability, upgrade all affected Serverpod client dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

serverpod_client fixed: 1.2.6
Upgrade serverpod_client to 1.2.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for serverpod_client

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-29887, inspect your project dependencies for Serverpod client:

inspect dependencies for serverpod_client

Analyze the terminal output to locate any version of Serverpod client in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.6), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Serverpod client, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

This bug bypassed the validation of TSL certificates on all none web HTTP clients in the `serverpod_client` package. Making them susceptible to a man in the middle attack against encrypted traffic between the client device and the server. An attacker would need to be able to intercept the traffic and highjack the connection to the server for this vulnerability to be used. ### Impact All versions of `serverpod_client` pre `1.2.6` ### Patches Upgrading to version `1.2.6` resolves this issue.

CVE-2024-29887 Affected Serverpod client Versions

1 component(s)
Fixed Versions:
1.2.6
Product / Package Ecosystem Affected Versions Fixed Version
serverpod_client
Pub
< 1.2.6
1.2.6

References

Frequently Asked Questions

What is CVE-2024-29887?
CVE-2024-29887 is a security vulnerability in Serverpod client involving Serverpod client accepts any certificate under CWE-295: Improper Certificate Validation.
Which Serverpod client versions are affected?
Affected versions include releases prior to 1.2.6 across affected packages: serverpod_client.
What version fixes CVE-2024-29887?
Upgrading to 1.2.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is serverpod_client affected?
Yes, serverpod_client is affected in releases prior to 1.2.6. Upgrade your dependency to 1.2.6 or later.
What is the CVSS score of CVE-2024-29887?
CVE-2024-29887 has a CVSS v3.1 base score of 7.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2024-29887?
CVE-2024-29887 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check Pub dependencies for CVE-2024-29887?
Run the dependency tree command: 'inspect dependencies for serverpod_client'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-h6x7-r5rg-x5fw",
  "modified" : "2024-03-28T17:53:26Z",
  "published" : "2024-03-28T17:53:26Z",
  "aliases" : [ "CVE-2024-29887" ],
  "summary" : "Serverpod client accepts any certificate",
  "details" : "This bug bypassed the validation of TSL certificates on all none web HTTP clients in the `serverpod_client` package. Making them susceptible to a man in the middle attack against encrypted traffic between the client device and the server. \n\nAn attacker would need to be able to intercept the traffic and highjack the connection to the server for this vulnerability to be used. \n\n### Impact\nAll versions of `serverpod_client` pre `1.2.6`\n\n### Patches\nUpgrading to version `1.2.6` resolves this issue.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Pub",
      "name" : "serverpod_client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/serverpod/serverpod/security/advisories/GHSA-h6x7-r5rg-x5fw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-29887"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/serverpod/serverpod/commit/d55bf8d12967fc7955a875cb3e0f9693bd6d2c71"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/serverpod/serverpod"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-28T17:53:26Z",
    "nvd_published_at" : "2024-03-27T19:15:49Z"
  }
}