CVE-2024-48915: Agent dart Agent Dart Is Missing Certificate Vulnerability

HIGH
Advisory Identifier: GHSA-fmj7-7gfw-64pg
CVSS 0.0
CWE-295 CWE-347
Published
Advisory Summary

CVE-2024-48915 is a HIGH (CVSS 0.0) agent dart is missing certificate vulnerability (CWE-295: Improper Certificate Validation) affecting Agent dart libraries in the Pub ecosystem. The issue involves agent dart is missing certificate verification checks. Remediation is available by upgrading affected packages to version 1.0.0-dev.29.

CVE-2024-48915 at a Glance

CVE Identifier CVE-2024-48915
GHSA Identifier GHSA-fmj7-7gfw-64pg
Severity HIGH
CVSS v3.1 Base Score 0.0
CWE Classification CWE-295: Improper Certificate Validation
Affected Product Agent dart
Package Ecosystem Pub
Published Date
Last Updated

Security Impact

CVSS: 0.0

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

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

How to Fix CVE-2024-48915

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

agent_dart fixed: 1.0.0-dev.29
Upgrade agent_dart to 1.0.0-dev.29
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 agent_dart

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-48915, inspect your project dependencies for Agent dart:

inspect dependencies for agent_dart

Analyze the terminal output to locate any version of Agent dart in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0-dev.29), 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 Agent dart, 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

Certificate verification (in [lib/agent/certificate.dart](https://github.com/AstroxNetwork/agent_dart/blob/main/lib/agent/certificate.dart)) has been found to contain two issues: - During the delegation verification (in [_checkDelegation](https://github.com/AstroxNetwork/agent_dart/blob/f50971dfae3f536c1720f0084f28afbcf5d99cb5/lib/agent/certificate.dart#L162) function) the canister_ranges aren't verified. The impact of not checking the canister_ranges is that a subnet can sign canister responses in behalf of another subnet. You have more details in the IC specification [here](https://internetcomputer.org/docs/current/references/ic-interface-spec#certification-delegation). Also for reference you can check how is this implemented in [the agent-rs](https://github.com/dfinity/agent-rs/blob/608a3f4cfdcdfc5ca1ca74a1b9d33f2137a2d324/ic-agent/src/agent/mod.rs#L903-L914). - The certificate’s timestamp, i.e /time path, is not verified, meaning that the certificate effectively has no expiration time. The [IC spec](https://internetcomputer.org/docs/current/references/ic-interface-spec#http-query) doesn’t specify an expiry times, it gives some suggestions, quoting: "A reasonable expiry time for timestamps in R.signatures and the certificate Cert is 5 minutes (analogously to the maximum allowed ingress expiry enforced by the IC mainnet). Delegations require expiry times of at least a week since the IC mainnet refreshes the delegations only after replica upgrades which typically happen once a week". For reference you can check how is this implemented in the agent-rs ([here](https://github.com/dfinity/agent-rs/blob/608a3f4cfdcdfc5ca1ca74a1b9d33f2137a2d324/ic-agent/src/agent/mod.rs#L820) and [here](https://github.com/dfinity/agent-rs/blob/608a3f4cfdcdfc5ca1ca74a1b9d33f2137a2d324/ic-agent/src/agent/mod.rs#L876-L887)). **Additionally**, seems [replica signed queries](https://internetcomputer.org/blog/features/replica-signed-queries) aren’t implemented

CVE-2024-48915 Affected Agent dart Versions

1 component(s)
Fixed Versions:
1.0.0-dev.29
Product / Package Ecosystem Affected Versions Fixed Version
agent_dart
Pub
< 1.0.0-dev.29
1.0.0-dev.29

References

Frequently Asked Questions

What is CVE-2024-48915?
CVE-2024-48915 is a security vulnerability in Agent dart involving Agent Dart is missing certificate verification checks under CWE-295: Improper Certificate Validation.
Which Agent dart versions are affected?
Affected versions include releases prior to 1.0.0-dev.29 across affected packages: agent_dart.
What version fixes CVE-2024-48915?
Upgrading to 1.0.0-dev.29 (or the latest patched release for your respective branch) resolves the vulnerability.
Is agent_dart affected?
Yes, agent_dart is affected in releases prior to 1.0.0-dev.29. Upgrade your dependency to 1.0.0-dev.29 or later.
What is the CVSS score of CVE-2024-48915?
CVE-2024-48915 has a CVSS v3.1 base score of 0.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N.
What CWE is associated with CVE-2024-48915?
CVE-2024-48915 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-48915?
Run the dependency tree command: 'inspect dependencies for agent_dart'. 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-fmj7-7gfw-64pg",
  "modified" : "2024-10-15T23:36:57Z",
  "published" : "2024-10-15T17:33:50Z",
  "aliases" : [ "CVE-2024-48915" ],
  "summary" : "Agent Dart is missing certificate verification checks",
  "details" : "Certificate verification (in [lib/agent/certificate.dart](https://github.com/AstroxNetwork/agent_dart/blob/main/lib/agent/certificate.dart)) has been found to contain two issues:\n   - During the delegation verification (in [_checkDelegation](https://github.com/AstroxNetwork/agent_dart/blob/f50971dfae3f536c1720f0084f28afbcf5d99cb5/lib/agent/certificate.dart#L162) function) the canister_ranges aren't verified. The impact of not checking the canister_ranges is that a subnet can sign canister responses in behalf of another subnet. You have more details in the IC specification [here](https://internetcomputer.org/docs/current/references/ic-interface-spec#certification-delegation). Also for reference you can check how is this implemented in [the agent-rs](https://github.com/dfinity/agent-rs/blob/608a3f4cfdcdfc5ca1ca74a1b9d33f2137a2d324/ic-agent/src/agent/mod.rs#L903-L914).\n    - The certificate’s timestamp, i.e /time path, is not verified, meaning that the certificate effectively has no expiration time. The [IC spec](https://internetcomputer.org/docs/current/references/ic-interface-spec#http-query) doesn’t specify an expiry times, it gives some suggestions, quoting: \"A reasonable expiry time for timestamps in R.signatures and the certificate Cert is 5 minutes (analogously to the maximum allowed ingress expiry enforced by the IC mainnet). Delegations require expiry times of at least a week since the IC mainnet refreshes the delegations only after replica upgrades which typically happen once a week\". For reference you can check how is this implemented in the agent-rs ([here](https://github.com/dfinity/agent-rs/blob/608a3f4cfdcdfc5ca1ca74a1b9d33f2137a2d324/ic-agent/src/agent/mod.rs#L820) and [here](https://github.com/dfinity/agent-rs/blob/608a3f4cfdcdfc5ca1ca74a1b9d33f2137a2d324/ic-agent/src/agent/mod.rs#L876-L887)).\n\n**Additionally**, seems [replica signed queries](https://internetcomputer.org/blog/features/replica-signed-queries) aren’t implemented",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Pub",
      "name" : "agent_dart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.0-dev.29"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.0.0-dev.28"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AstroxNetwork/agent_dart/security/advisories/GHSA-fmj7-7gfw-64pg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-48915"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AstroxNetwork/agent_dart/commit/0d200686aabcd9313c7bc3e675cbdc82f6b775cf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AstroxNetwork/agent_dart"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AstroxNetwork/agent_dart/blob/f50971dfae3f536c1720f0084f28afbcf5d99cb5/lib/agent/certificate.dart#L162"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AstroxNetwork/agent_dart/blob/main/lib/agent/certificate.dart"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295", "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-15T17:33:50Z",
    "nvd_published_at" : "2024-10-15T17:15:11Z"
  }
}