CVE-2021-3917: Coreos installer Coreos-installer < 0.10.0 Writes World-readable Vulnerability

MODERATE
Advisory Identifier: GHSA-862g-9h5m-m3qv
CVSS 5.5
CWE-276
Published
Advisory Summary

CVE-2021-3917 is a MODERATE (CVSS 5.5) coreos-installer < 0.10.0 writes world-readable vulnerability (CWE-276: Incorrect Default Permissions) affecting Coreos installer libraries in the crates.io ecosystem. The issue involves coreos-installer < 0.10.0 writes world-readable ignition config to installed system. Remediation is available by upgrading affected packages to version 0.10.0.

CVE-2021-3917 at a Glance

CVE Identifier CVE-2021-3917
GHSA Identifier GHSA-862g-9h5m-m3qv
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-276: Incorrect Default Permissions
Affected Product Coreos installer
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 5.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:U/C:H/I:N/A:N).

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 None (I:N)
Availability None (A:N)

How to Fix CVE-2021-3917

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

coreos-installer fixed: 0.10.0
Upgrade coreos-installer to 0.10.0
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 coreos-installer

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-3917, inspect your project dependencies for Coreos installer:

inspect dependencies for coreos-installer

Analyze the terminal output to locate any version of Coreos installer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.0), 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-276: Incorrect Default Permissions, where during installation, installed file permissions are set to allow anyone to modify those files. In Coreos installer, 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 On systems installed with coreos-installer before 0.10.0, the user-provided Ignition config was written to `/boot/ignition/config.ign` with world-readable permissions, granting unprivileged users access to any secrets included in the config. Default configurations of Fedora CoreOS and RHEL CoreOS do not include any unprivileged user accounts. In addition, instances launched from a cloud image, and systems provisioned with the `ignition.config.url` kernel argument, do not use the `config.ign` file and are unaffected. ### Patches coreos-installer 0.10.0 and later [writes](https://github.com/coreos/coreos-installer/pull/571) the Ignition config with restricted permissions. ### Workarounds On Fedora CoreOS systems installed from version 34.20210711.3.0 (stable), 34.20210711.2.0 (testing), 34.20210711.1.1 (next) and later, the `/boot/ignition` directory and its contents are removed after provisioning is complete. All Fedora CoreOS systems that have updated to these versions or later have automatically removed the `/boot/ignition` directory and no action is required. On other systems, `/boot/ignition/config.ign` can be removed manually, as it is not used after provisioning is complete: ``` sudo mount -o remount,rw /boot sudo rm -rf /boot/ignition ``` ### References For more information, see https://github.com/coreos/fedora-coreos-tracker/issues/889. ### For more information If you have any questions or comments about this advisory, [open an issue in coreos-installer](https://github.com/coreos/coreos-installer/issues/new/choose) or email the CoreOS [development mailing list](https://lists.fedoraproject.org/archives/list/coreos@lists.fedoraproject.org/).

CVE-2021-3917 Affected Coreos installer Versions

1 component(s)
Fixed Versions:
0.10.0
Product / Package Ecosystem Affected Versions Fixed Version
coreos-installer
crates.io
< 0.10.0
0.10.0

References

Frequently Asked Questions

What is CVE-2021-3917?
CVE-2021-3917 is a security vulnerability in Coreos installer involving coreos-installer < 0.10.0 writes world-readable Ignition config to installed system under CWE-276: Incorrect Default Permissions.
Which Coreos installer versions are affected?
Affected versions include releases prior to 0.10.0 across affected packages: coreos-installer.
What version fixes CVE-2021-3917?
Upgrading to 0.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is coreos-installer affected?
Yes, coreos-installer is affected in releases prior to 0.10.0. Upgrade your dependency to 0.10.0 or later.
What is the CVSS score of CVE-2021-3917?
CVE-2021-3917 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2021-3917?
CVE-2021-3917 is classified under CWE-276: Incorrect Default Permissions (During installation, installed file permissions are set to allow anyone to modify those files.).
How can I check crates.io dependencies for CVE-2021-3917?
Run the dependency tree command: 'inspect dependencies for coreos-installer'. 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-862g-9h5m-m3qv",
  "modified" : "2022-09-08T14:25:48Z",
  "published" : "2021-11-08T18:01:13Z",
  "aliases" : [ "CVE-2021-3917" ],
  "summary" : "coreos-installer < 0.10.0 writes world-readable Ignition config to installed system",
  "details" : "### Impact\nOn systems installed with coreos-installer before 0.10.0, the user-provided Ignition config was written to `/boot/ignition/config.ign` with world-readable permissions, granting unprivileged users access to any secrets included in the config.\n\nDefault configurations of Fedora CoreOS and RHEL CoreOS do not include any unprivileged user accounts.  In addition, instances launched from a cloud image, and systems provisioned with the `ignition.config.url` kernel argument, do not use the `config.ign` file and are unaffected.\n\n### Patches\ncoreos-installer 0.10.0 and later [writes](https://github.com/coreos/coreos-installer/pull/571) the Ignition config with restricted permissions.\n\n### Workarounds\n\nOn Fedora CoreOS systems installed from version 34.20210711.3.0 (stable), 34.20210711.2.0 (testing), 34.20210711.1.1 (next) and later, the `/boot/ignition` directory and its contents are removed after provisioning is complete. All Fedora CoreOS systems that have updated to these versions or later have automatically removed the `/boot/ignition` directory and no action is required.\n\nOn other systems, `/boot/ignition/config.ign` can be removed manually, as it is not used after provisioning is complete:\n\n```\nsudo mount -o remount,rw /boot\nsudo rm -rf /boot/ignition\n```\n\n### References\nFor more information, see https://github.com/coreos/fedora-coreos-tracker/issues/889.\n\n### For more information\nIf you have any questions or comments about this advisory, [open an issue in coreos-installer](https://github.com/coreos/coreos-installer/issues/new/choose) or email the CoreOS [development mailing list](https://lists.fedoraproject.org/archives/list/coreos@lists.fedoraproject.org/).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "coreos-installer"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.10.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/coreos/coreos-installer/security/advisories/GHSA-862g-9h5m-m3qv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-3917"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coreos/fedora-coreos-tracker/issues/889"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coreos/coreos-installer/commit/2a36405339c87b16ed6c76e91ad5b76638fbdb0c"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2021-3917"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2018478"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coreos/coreos-installer"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/coreos/coreos-installer/releases/tag/v0.10.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-276" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-04T17:11:09Z",
    "nvd_published_at" : "2022-08-23T20:15:00Z"
  }
}