CVE-2023-38496: Github.com/apptainer/apptainer Ineffective Privileges Drop When Requesting Vulnerability

MODERATE
Advisory Identifier: GHSA-mmx5-32m4-wxvx
CVSS 6.1
CWE-269
Published
Advisory Summary

CVE-2023-38496 is a MODERATE (CVSS 6.1) ineffective privileges drop when requesting vulnerability (CWE-269: Improper Privilege Management) affecting Github.com/apptainer/apptainer libraries in the Go ecosystem. The issue involves ineffective privileges drop when requesting container network. Remediation is available by upgrading affected packages to version 1.2.1.

CVE-2023-38496 at a Glance

CVE Identifier CVE-2023-38496
GHSA Identifier GHSA-mmx5-32m4-wxvx
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-269: Improper Privilege Management
Affected Product Github.com/apptainer/apptainer
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.1

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

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

How to Fix CVE-2023-38496

To remediate this vulnerability, upgrade all affected Github.com/apptainer/apptainer 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/apptainer/apptainer fixed: 1.2.1
Upgrade github.com/apptainer/apptainer to 1.2.1
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/apptainer/apptainer

How to Check if You Are Affected

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

inspect dependencies for github.com/apptainer/apptainer

Analyze the terminal output to locate any version of Github.com/apptainer/apptainer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.1), 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 Github.com/apptainer/apptainer, 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 Fix https://github.com/apptainer/apptainer/pull/1523 included in Apptainer 1.2.0-rc.2 has introduced an ineffective privilege drop when requesting container network setup, therefore subsequent functions are called with root privileges. The attack surface is rather limited for users but an attacker could possibly craft a starter config to delete any directory on the host filesystems. Only affects setuid installations of Apptainer. ### Patches The security fix https://github.com/apptainer/apptainer/pull/1578 has been included in Apptainer 1.2.1 ### Workarounds There is no known workaround outside of upgrading to Apptainer 1.2.1

CVE-2023-38496 Affected Github.com/apptainer/apptainer Versions

1 component(s)
Fixed Versions:
1.2.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/apptainer/apptainer
Go
≥ 1.2.0
< 1.2.1
1.2.1

References

Frequently Asked Questions

What is CVE-2023-38496?
CVE-2023-38496 is a security vulnerability in Github.com/apptainer/apptainer involving Ineffective privileges drop when requesting container network under CWE-269: Improper Privilege Management.
Which Github.com/apptainer/apptainer versions are affected?
Affected versions include releases prior to 1.2.1 across affected packages: github.com/apptainer/apptainer.
What version fixes CVE-2023-38496?
Upgrading to 1.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/apptainer/apptainer affected?
Yes, github.com/apptainer/apptainer is affected in releases prior to 1.2.1. Upgrade your dependency to 1.2.1 or later.
What is the CVSS score of CVE-2023-38496?
CVE-2023-38496 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H.
What CWE is associated with CVE-2023-38496?
CVE-2023-38496 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 Go dependencies for CVE-2023-38496?
Run the dependency tree command: 'inspect dependencies for github.com/apptainer/apptainer'. 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-mmx5-32m4-wxvx",
  "modified" : "2023-07-25T13:52:20Z",
  "published" : "2023-07-25T13:52:20Z",
  "aliases" : [ "CVE-2023-38496" ],
  "summary" : "Ineffective privileges drop when requesting container network",
  "details" : "### Impact\n\nFix https://github.com/apptainer/apptainer/pull/1523 included in Apptainer 1.2.0-rc.2 has introduced an ineffective privilege drop when requesting container network setup, therefore subsequent functions are called with root privileges.  The attack surface is rather limited for users but an attacker could possibly craft a starter config to delete any directory on the host filesystems.  Only affects setuid installations of Apptainer.  \n\n### Patches\n\nThe security fix https://github.com/apptainer/apptainer/pull/1578 has been included in Apptainer 1.2.1\n\n### Workarounds\n\nThere is no known workaround outside of upgrading to Apptainer 1.2.1",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/apptainer/apptainer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.2.0"
      }, {
        "fixed" : "1.2.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/apptainer/apptainer/security/advisories/GHSA-mmx5-32m4-wxvx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-38496"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apptainer/apptainer/pull/1523"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apptainer/apptainer/pull/1578"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apptainer/apptainer"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-25T13:52:20Z",
    "nvd_published_at" : "2023-07-25T22:15:10Z"
  }
}