Lucene search

K
githubGitHub Advisory DatabaseGHSA-634P-93H9-92VH
HistorySep 16, 2022 - 10:06 p.m.

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

2022-09-1622:06:55
CWE-74
CWE-1236
GitHub Advisory Database
github.com
17
github action
vulnerability
api output
sanitization
execution
malicious code
csv file
security
defusedcsv
cwe-1236
owasp
codeql
python
pypi.

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

0.002 Low

EPSS

Percentile

57.4%

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

Affected configurations

Vulners
Node
some-natalieghas-to-csvRange<1
CPENameOperatorVersion
some-natalie/ghas-to-csvlt1

9.8 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

0.002 Low

EPSS

Percentile

57.4%

Related for GHSA-634P-93H9-92VH