GHSA-634p-93h9-92vh

Suggest an improvement
Source
https://github.com/advisories/GHSA-634p-93h9-92vh
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/09/GHSA-634p-93h9-92vh/GHSA-634p-93h9-92vh.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-634p-93h9-92vh
Aliases
Published
2022-09-16T22:06:55Z
Modified
2023-11-08T04:10:15.184522Z
Severity
  • 5.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L CVSS Calculator
Summary
ghas-to-csv vulnerable to Improper Neutralization of Formula Elements in a CSV File
Details

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 👇🏻

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
  • CSV injection information from OWASP
  • CodeQL query for CWE-1236 in Python here
  • PyPI site for defusedcsv here

For more information

If you have any questions or comments about this advisory:

  • Open an issue in this repository here
Database specific
{
    "nvd_published_at": "2022-09-17T00:15:00Z",
    "github_reviewed_at": "2022-09-16T22:06:55Z",
    "severity": "MODERATE",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-1236",
        "CWE-74"
    ]
}
References

Affected packages

GitHub Actions / some-natalie/ghas-to-csv

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1