Skip to content

ghas-to-csv vulnerable to Improper Neutralization of Formula Elements in a CSV File

Moderate severity GitHub Reviewed Published Sep 16, 2022 in advanced-security/ghas-to-csv • Updated Jan 28, 2023

Package

actions some-natalie/ghas-to-csv (GitHub Actions)

Affected versions

< 1

Patched versions

1

Description

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

References

Published to the GitHub Advisory Database Sep 16, 2022
Reviewed Sep 16, 2022
Published by the National Vulnerability Database Sep 17, 2022
Last updated Jan 28, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L

EPSS score

0.197%
(58th percentile)

CVE ID

CVE-2022-39217

GHSA ID

GHSA-634p-93h9-92vh

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.