CVE-2023-0092: Github.com/juju/juju Juju Controller - Arbitrary File Vulnerability

MODERATE
Advisory Identifier: GHSA-x5rv-w9pm-8qp8
CVSS 4.9
CWE-73 CWE-22
Published
Advisory Summary

CVE-2023-0092 is a MODERATE (CVSS 4.9) juju controller - arbitrary file vulnerability (CWE-73: External Control of File Name or Path) affecting Github.com/juju/juju libraries in the Go ecosystem. The issue involves juju controller - arbitrary file reading vulnerability. Remediation is available by upgrading affected packages to version 2.9.38, 3.0.3.

CVE-2023-0092 at a Glance

CVE Identifier CVE-2023-0092
GHSA Identifier GHSA-x5rv-w9pm-8qp8
Severity MODERATE
CVSS v3.1 Base Score 4.9
CWE Classification CWE-73: External Control of File Name or Path
Affected Product Github.com/juju/juju
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.9

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

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

How to Fix CVE-2023-0092

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

github.com/juju/juju fixed: 2.9.38
Upgrade github.com/juju/juju to 2.9.38
github.com/juju/juju fixed: 3.0.3
Upgrade github.com/juju/juju to 3.0.3
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 github.com/juju/juju

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-0092, inspect your project dependencies for Github.com/juju/juju:

inspect dependencies for github.com/juju/juju

Analyze the terminal output to locate any version of Github.com/juju/juju in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.38), 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-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In Github.com/juju/juju, 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

### Impact An authenticated user who has read access to the juju controller model, may construct a remote request to download an arbitrary file from the controller's filesystem. ### Patches Patched in juju 2.9.38 and juju 3.0.3 [juju/juju#ef803e2](https://github.com/juju/juju/commit/ef803e2a13692d355b784b7da8b4b1f01dab1556) ### Workarounds Limit read access to the controller model to only trusted users.

CVE-2023-0092 Affected Github.com/juju/juju Versions

2 component(s)
Fixed Versions:
2.9.383.0.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/juju/juju
Go
≥ 2.9.22
< 2.9.38
2.9.38
github.com/juju/juju
Go
≥ 3.0.0
< 3.0.3
3.0.3

References

Frequently Asked Questions

What is CVE-2023-0092?
CVE-2023-0092 is a security vulnerability in Github.com/juju/juju involving Juju controller - Arbitrary file reading vulnerability under CWE-73: External Control of File Name or Path.
Which Github.com/juju/juju versions are affected?
Affected versions include releases prior to 2.9.38, 3.0.3 across affected packages: github.com/juju/juju.
What version fixes CVE-2023-0092?
Upgrading to 2.9.38, 3.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/juju/juju affected?
Yes, github.com/juju/juju is affected in releases prior to 2.9.38, 3.0.3. Upgrade your dependency to 2.9.38, 3.0.3 or later.
What is the CVSS score of CVE-2023-0092?
CVE-2023-0092 has a CVSS v3.1 base score of 4.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-0092?
CVE-2023-0092 is classified under CWE-73: External Control of File Name or Path (The product allows user input to control or influence paths or file names that are used in filesystem operations.).
How can I check Go dependencies for CVE-2023-0092?
Run the dependency tree command: 'inspect dependencies for github.com/juju/juju'. 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-x5rv-w9pm-8qp8",
  "modified" : "2025-02-07T20:45:09Z",
  "published" : "2023-03-01T19:17:17Z",
  "aliases" : [ "CVE-2023-0092" ],
  "summary" : "Juju controller - Arbitrary file reading vulnerability",
  "details" : "### Impact\nAn authenticated user who has read access to the juju controller model, may construct a remote request to download an arbitrary file from the controller's filesystem.\n\n### Patches\nPatched in juju 2.9.38 and juju 3.0.3\n[juju/juju#ef803e2](https://github.com/juju/juju/commit/ef803e2a13692d355b784b7da8b4b1f01dab1556)\n\n### Workarounds\nLimit read access to the controller model to only trusted users.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juju/juju"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.9.22"
      }, {
        "fixed" : "2.9.38"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/juju/juju"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.0.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/juju/juju/security/advisories/GHSA-x5rv-w9pm-8qp8"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-0092"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/juju/juju/commit/ef803e2a13692d355b784b7da8b4b1f01dab1556"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.launchpad.net/juju/+bug/1999622"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-x5rv-w9pm-8qp8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/juju/juju"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-73" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-03-01T19:17:17Z",
    "nvd_published_at" : "2025-01-31T02:15:28Z"
  }
}