CVE-2025-65807: Sd Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-qwcc-2r77-5w2f
CVSS 6.5
CWE-266
Published
Advisory Summary

CVE-2025-65807 is a MODERATE (CVSS 6.5) remote code execution vulnerability (CWE-266: Incorrect Privilege Assignment) affecting Sd libraries in the crates.io ecosystem. The issue involves sd changes the group ownership of the source file. Remediation is available in the latest vendor maintenance releases.

CVE-2025-65807 at a Glance

CVE Identifier CVE-2025-65807
GHSA Identifier GHSA-qwcc-2r77-5w2f
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-266: Incorrect Privilege Assignment
Affected Product Sd
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 6.5

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:L/I:L/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 Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-65807

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

sd fixed: Latest secure release
Upgrade sd to Latest secure release
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 sd

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-65807, inspect your project dependencies for Sd:

inspect dependencies for sd

Analyze the terminal output to locate any version of Sd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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-266: Incorrect Privilege Assignment, where a product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor. In Sd, 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

An issue in sd command v1.0.0 and before allows attackers to escalate privileges to root via a crafted command.

CVE-2025-65807 Affected Sd Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
sd
crates.io
≤ 1.0.0

References

Frequently Asked Questions

What is CVE-2025-65807?
CVE-2025-65807 is a security vulnerability in Sd involving sd changes the group ownership of the source file under CWE-266: Incorrect Privilege Assignment.
Which Sd versions are affected?
Affected versions include releases prior to current release patches across affected packages: sd.
What version fixes CVE-2025-65807?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is sd affected?
Yes, sd is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2025-65807?
CVE-2025-65807 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2025-65807?
CVE-2025-65807 is classified under CWE-266: Incorrect Privilege Assignment (A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.).
How can I check crates.io dependencies for CVE-2025-65807?
Run the dependency tree command: 'inspect dependencies for sd'. 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-qwcc-2r77-5w2f",
  "modified" : "2025-12-10T21:55:41Z",
  "published" : "2025-12-10T18:30:26Z",
  "aliases" : [ "CVE-2025-65807" ],
  "summary" : "sd changes the group ownership of the source file",
  "details" : "An issue in sd command v1.0.0 and before allows attackers to escalate privileges to root via a crafted command.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "sd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-65807"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/faabbi/827f10e144fdd342e13a3dd838902e83"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/chmln/sd"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-266" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-10T21:55:41Z",
    "nvd_published_at" : "2025-12-10T16:16:27Z"
  }
}