Vulnerabilities in pkg:golang/github.com/canonical/pebble
PACKAGECVE-2024-3250 is a MODERATE (CVSS 6.5) pebble service manager's file pull vulnerability (CWE-862: Missing Authorization) affecting Github.com/canonical/pebble libraries in the Go ecosystem. The issue involves pebble service manager's file pull api allows access by any user. Remediation is available by upgrading affected packages to version 1.7.3, 1.4.2, 1.10.2, 1.1.1.
pkg:golang/github.com/canonical/pebble
Vulnerability advisories affecting package pkg:golang/github.com/canonical/pebble. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-4685-2x5r-65pj | CVE-2024-3250 | MODERATE | Pebble service manager's file pull API allows access by any user |
| GHSA-65pc-76pq-pvf5 | - | MODERATE | Duplicate Advisory: Pebble service manager's file pull API allows access by any user |
CVE-2024-3250 at a Glance
Security Impact
CVSS: 6.5
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:C/C:H/I:N/A:N).
How to Fix CVE-2024-3250
To remediate this vulnerability, upgrade all affected Github.com/canonical/pebble dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/canonical/pebble to 1.7.3
Upgrade github.com/canonical/pebble to 1.4.2
Upgrade github.com/canonical/pebble to 1.10.2
Upgrade github.com/canonical/pebble to 1.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/canonical/pebble
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-3250, inspect your project dependencies for Github.com/canonical/pebble:
inspect dependencies for github.com/canonical/pebble
Analyze the terminal output to locate any version of Github.com/canonical/pebble in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.7.3), 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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Github.com/canonical/pebble, 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
CVE-2024-3250 Affected Github.com/canonical/pebble Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/canonical/pebble
|
Go |
≥ 1.5.0
< 1.7.3
|
1.7.3
|
|
github.com/canonical/pebble
|
Go |
≥ 1.2.0
< 1.4.2
|
1.4.2
|
|
github.com/canonical/pebble
|
Go |
≥ 1.8.0
< 1.10.2
|
1.10.2
|
|
github.com/canonical/pebble
|
Go |
< 1.1.1
|
1.1.1
|
References
Frequently Asked Questions
What is CVE-2024-3250?
Which Github.com/canonical/pebble versions are affected?
What version fixes CVE-2024-3250?
Is github.com/canonical/pebble affected?
What is the CVSS score of CVE-2024-3250?
What CWE is associated with CVE-2024-3250?
How can I check Go dependencies for CVE-2024-3250?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4685-2x5r-65pj",
"modified" : "2024-04-05T15:07:16Z",
"published" : "2024-04-05T15:03:03Z",
"aliases" : [ "CVE-2024-3250" ],
"summary" : "Pebble service manager's file pull API allows access by any user",
"details" : "### Impact\n\nNote: \"Pebble\" here refers to [Canonical's service manager](https://github.com/canonical/pebble), not the [Let's Encrypt ACME test server](https://github.com/letsencrypt/pebble).\n\nThe API behind `pebble pull`, used to read files from the workload container by Juju charms, allows access from any user, instead of just admin. In Juju Kubernetes sidecar charms, Pebble and the charm run as root, so they have full access. But if another restricted unix user gains local access to the container host, they could hit the Pebble `GET /v1/files?action=read` API and would be allowed to read any file in the workload container, for example an ssh key or database password or other sensitive information. If there are ssh keys they could then potentially ssh into the workload, or if something like a database password they could log into the database.\n\nNote that this requires local user access to the host machine. It seems unlikely that an attacker could gain this level of access in a Juju Kubernetes context, but if someone did and there's sensitive information in files accessible to Pebble, the consequences are bad.\n\nTo reproduce the issue, go back to the Pebble version in Juju 2.9 (5842ea68c9c7), do `pebble run` as root in one terminal window, then in another terminal window, as a regular user, use the `pebble pull` CLI. You will be able to pull any file as a regular user.\n\n### Patches\n\nThe original patch is commit https://github.com/canonical/pebble/commit/cd326225b9b0be067da7d8858e2c912078cbbbd5. There's also https://github.com/canonical/pebble/pull/406, which fixes this issue in more recent Pebble versions (that PR also fixes a separate issue we introduced more recently, but hasn't been released in Juju yet).\n\nWe released the fix in the following Pebble versions:\n\n- https://github.com/canonical/pebble/releases/tag/v1.1.1\n- https://github.com/canonical/pebble/releases/tag/v1.4.2\n- https://github.com/canonical/pebble/releases/tag/v1.7.4\n- https://github.com/canonical/pebble/releases/tag/v1.10.2\n\nJuju will be releasing patch versions with this fix shortly:\n\n- Juju 2.9.49 (Pebble v1.1.1)\n- Juju 3.1.8 (Pebble v1.4.2)\n- Juju 3.3.4 (Pebble v1.4.2)\n- Juju 3.4.2 (Pebble v1.7.4)\n- Juju 3.5.0 (Pebble v1.10.2)\n\n### References\n\n* https://www.cve.org/CVERecord?id=CVE-2024-3250\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/canonical/pebble"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.2.0"
}, {
"fixed" : "1.4.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 1.4.1"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/canonical/pebble"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.0"
}, {
"fixed" : "1.7.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/canonical/pebble"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.8.0"
}, {
"fixed" : "1.10.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "< 1.10.1"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/canonical/pebble"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/canonical/pebble/security/advisories/GHSA-4685-2x5r-65pj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-3250"
}, {
"type" : "WEB",
"url" : "https://github.com/canonical/pebble/pull/406"
}, {
"type" : "WEB",
"url" : "https://github.com/canonical/pebble/commit/4ca343d3889533143477e21c63867f2f3c3b5645"
}, {
"type" : "WEB",
"url" : "https://github.com/canonical/pebble/commit/a5f6f062a11ea156697b854264385ff7e1985fd8"
}, {
"type" : "WEB",
"url" : "https://github.com/canonical/pebble/commit/b8abd1ff0090f3e0749e81eb1fc3ea16ba95f514"
}, {
"type" : "WEB",
"url" : "https://github.com/canonical/pebble/commit/cd326225b9b0be067da7d8858e2c912078cbbbd5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/canonical/pebble"
}, {
"type" : "WEB",
"url" : "https://www.cve.org/CVERecord?id=CVE-2024-3250"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-862" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-05T15:03:03Z",
"nvd_published_at" : null
}
}