GHSA-pfpr-3463-c6jh

Suggest an improvement
Source
https://github.com/advisories/GHSA-pfpr-3463-c6jh
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/01/GHSA-pfpr-3463-c6jh/GHSA-pfpr-3463-c6jh.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-pfpr-3463-c6jh
Aliases
Published
2023-01-09T21:55:14Z
Modified
2023-11-08T04:10:57.046643Z
Severity
  • 8.0 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
ruby-git has potential remote code execution vulnerability
Details

The git gem, between versions 1.2.0 and 1.12.0, incorrectly parsed the output of the git ls-files command using eval() to unescape quoted file names. If a file name was added to the git repository contained special characters, such as \n, then the git ls-files command would print the file name in quotes and escape any special characters. If the Git#ls_files method encountered a quoted file name it would use eval() to unquote and unescape any special characters, leading to potential remote code execution. Version 1.13.0 of the git gem was released which correctly parses any quoted file names.

References

Affected packages

RubyGems / git

Package

Name
git
Purl
pkg:gem/git

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.2.0
Fixed
1.13.0

Affected versions

1.*

1.2.0
1.2.1
1.2.2
1.2.3
1.2.4
1.2.5
1.2.6
1.2.7
1.2.8
1.2.9
1.2.9.1
1.3.0
1.4.0
1.5.0
1.6.0.pre1
1.6.0
1.7.0
1.8.0
1.8.1
1.9.0
1.9.1
1.10.0
1.10.1
1.10.2
1.11.0
1.12.0