CVE-2022-39217: Some natalie/ghas to csv Ghas-to-csv Vulnerable To Improper Neutralization Vulnerability

MODERATE
Advisory Identifier: GHSA-634p-93h9-92vh
CVSS 5.8
CWE-74 CWE-1236
Published
Advisory Summary

CVE-2022-39217 is a MODERATE (CVSS 5.8) ghas-to-csv vulnerable to improper neutralization vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Some natalie/ghas to csv libraries in the GitHub Actions ecosystem. The issue involves ghas-to-csv vulnerable to improper neutralization of formula elements in a csv file. Remediation is available by upgrading affected packages to version 1.

CVE-2022-39217 at a Glance

CVE Identifier CVE-2022-39217
GHSA Identifier GHSA-634p-93h9-92vh
Severity MODERATE
CVSS v3.1 Base Score 5.8
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Some natalie/ghas to csv
Package Ecosystem GitHub Actions
Published Date
Last Updated

Security Impact

CVSS: 5.8

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

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

How to Fix CVE-2022-39217

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

some-natalie/ghas-to-csv fixed: 1
Upgrade some-natalie/ghas-to-csv to 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 some-natalie/ghas-to-csv

How to Check if You Are Affected

To determine whether your application is affected by CVE-2022-39217, inspect your project dependencies for Some natalie/ghas to csv:

inspect dependencies for some-natalie/ghas-to-csv

Analyze the terminal output to locate any version of Some natalie/ghas to csv in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Some natalie/ghas to csv, 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 This GitHub Action creates a CSV file without sanitizing the output of the APIs. If an alert is dismissed or any other custom field contains executable code / formulas, it might be run when an endpoint opens that CSV file in a spreadsheet program. The data flow looks like this 👇🏻 ```mermaid graph TD A(Repository) -->|developer dismissal, other data input| B(GitHub Advanced Security data) B -->|ghas-to-csv| C(CSV file) C -->|spreadsheet program| D(endpoint executes potentially malicious code) ``` ### Patches Please use version `v1` or later. That tag moves from using `csv` to `defusedcsv` to mitigate this problem. ### Workarounds There is no workaround. Please upgrade to using the latest tag, `v1` (or later). ### References * CWE-1236 information from [MITRE](https://cwe.mitre.org/data/definitions/1236.html) * CSV injection information from [OWASP](https://owasp.org/www-community/attacks/CSV_Injection) * CodeQL query for CWE-1236 in Python [here](https://github.com/github/codeql/tree/main/python/ql/src/experimental/Security/CWE-1236) * PyPI site for `defusedcsv` [here](https://pypi.org/project/defusedcsv/) ### For more information If you have any questions or comments about this advisory: * Open an issue in this repository [here](https://github.com/some-natalie/ghas-to-csv/issues)

CVE-2022-39217 Affected Some natalie/ghas to csv Versions

1 component(s)
Fixed Versions:
1
Product / Package Ecosystem Affected Versions Fixed Version
some-natalie/ghas-to-csv
GitHub Actions
< 1
1

References

Frequently Asked Questions

What is CVE-2022-39217?
CVE-2022-39217 is a security vulnerability in Some natalie/ghas to csv involving ghas-to-csv vulnerable to Improper Neutralization of Formula Elements in a CSV File under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Some natalie/ghas to csv versions are affected?
Affected versions include releases prior to 1 across affected packages: some-natalie/ghas-to-csv.
What version fixes CVE-2022-39217?
Upgrading to 1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is some-natalie/ghas-to-csv affected?
Yes, some-natalie/ghas-to-csv is affected in releases prior to 1. Upgrade your dependency to 1 or later.
What is the CVSS score of CVE-2022-39217?
CVE-2022-39217 has a CVSS v3.1 base score of 5.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2022-39217?
CVE-2022-39217 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check GitHub Actions dependencies for CVE-2022-39217?
Run the dependency tree command: 'inspect dependencies for some-natalie/ghas-to-csv'. 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-634p-93h9-92vh",
  "modified" : "2022-09-19T20:20:23Z",
  "published" : "2022-09-16T22:06:55Z",
  "aliases" : [ "CVE-2022-39217" ],
  "summary" : "ghas-to-csv vulnerable to Improper Neutralization of Formula Elements in a CSV File",
  "details" : "### Impact\n\nThis GitHub Action creates a CSV file without sanitizing the output of the APIs.  If an alert is dismissed or any other custom field contains executable code / formulas, it might be run when an endpoint opens that CSV file in a spreadsheet program.  The data flow looks like this 👇🏻 \n\n```mermaid\ngraph TD\n    A(Repository) -->|developer dismissal, other data input| B(GitHub Advanced Security data)\n    B -->|ghas-to-csv| C(CSV file)\n    C -->|spreadsheet program| D(endpoint executes potentially malicious code)\n```\n\n### Patches\n\nPlease use version `v1` or later.  That tag moves from using `csv` to `defusedcsv` to mitigate this problem.\n\n### Workarounds\n\nThere is no workaround.  Please upgrade to using the latest tag, `v1` (or later).\n\n### References\n\n* CWE-1236 information from [MITRE](https://cwe.mitre.org/data/definitions/1236.html)\n* CSV injection information from [OWASP](https://owasp.org/www-community/attacks/CSV_Injection)\n* CodeQL query for CWE-1236 in Python [here](https://github.com/github/codeql/tree/main/python/ql/src/experimental/Security/CWE-1236)\n* PyPI site for `defusedcsv` [here](https://pypi.org/project/defusedcsv/)\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in this repository [here](https://github.com/some-natalie/ghas-to-csv/issues)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "GitHub Actions",
      "name" : "some-natalie/ghas-to-csv"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/some-natalie/ghas-to-csv/security/advisories/GHSA-634p-93h9-92vh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39217"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/some-natalie/ghas-to-csv/issues/19"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/some-natalie/ghas-to-csv/pull/20"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/some-natalie/ghas-to-csv/commit/d0b521928fa734513b5cd9c7d9d8e09db50e884a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/some-natalie/ghas-to-csv"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1236", "CWE-74" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-09-16T22:06:55Z",
    "nvd_published_at" : "2022-09-17T00:15:00Z"
  }
}