ID CVE-2022-48338
Summary An issue was discovered in GNU Emacs through 28.2. In ruby-mode.el, the ruby-find-library-file function has a local command injection vulnerability. The ruby-find-library-file function is an interactive function, and bound to C-c C-f. Inside the function, the external command gem is called through shell-command-to-string, but the feature-name parameters are not escaped. Thus, malicious Ruby source files may cause commands to be executed.
References
Vulnerable Configurations
  • cpe:2.3:a:gnu:emacs:-:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:-:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:13:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:13:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:15.10:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:15.10:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:15.34:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:15.34:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:16.56:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:16.56:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:16.57:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:16.57:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:16.58:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:16.58:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:16.59:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:16.59:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:16.60:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:16.60:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.36:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.36:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.43:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.43:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.46:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.46:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.48:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.48:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.49:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.49:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.55:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.55:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.57:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.57:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.58:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.58:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.61:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.61:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.63:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.63:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:17.64:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:17.64:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.41:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.41:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.45:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.45:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.46:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.46:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.47:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.47:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.48:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.48:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.49:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.49:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.50:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.50:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.51:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.51:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.52:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.52:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.53:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.53:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.54:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.54:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.55:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.55:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.56:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.56:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.57:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.57:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.58:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.58:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:18.59:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:18.59:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.7:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.7:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.8:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.8:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.9:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.9:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.10:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.10:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.11:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.11:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.12:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.12:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.13:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.13:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.14:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.14:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.15:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.15:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.16:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.16:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.17:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.17:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.18:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.18:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.19:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.19:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.20:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.20:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.21:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.21:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.22:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.22:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.23:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.23:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.24:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.24:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.25:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.25:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.26:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.26:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.28:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.28:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.29:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.29:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.30:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.30:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.31:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.31:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.32:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.32:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.33:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.33:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:19.34:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:19.34:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:20.0:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:20.0:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:20.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:20.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:20.2:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:20.2:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:20.3:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:20.3:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:20.4:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:20.4:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:20.5:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:20.5:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:20.6:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:20.6:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:20.7:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:20.7:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:21:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:21:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:21.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:21.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:21.2:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:21.2:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:21.2.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:21.2.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:21.3:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:21.3:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:21.3.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:21.3.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:21.4:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:21.4:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:21.4a:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:21.4a:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:22.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:22.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:22.2:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:22.2:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:22.3:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:22.3:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:23.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:23.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:23.2:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:23.2:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:23.2b:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:23.2b:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:23.3:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:23.3:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:23.3b:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:23.3b:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:23.4:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:23.4:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:24.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:24.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:24.2:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:24.2:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:24.3:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:24.3:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:24.4:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:24.4:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:24.5:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:24.5:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:25.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:25.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:25.2:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:25.2:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:25.3:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:25.3:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:26.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:26.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:26.1-9.el8:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:26.1-9.el8:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:26.2:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:26.2:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:26.3:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:26.3:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:27.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:27.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:27.2:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:27.2:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:27.2-8.el9:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:27.2-8.el9:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:28.1:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:28.1:*:*:*:*:*:*:*
  • cpe:2.3:a:gnu:emacs:28.2:*:*:*:*:*:*:*
    cpe:2.3:a:gnu:emacs:28.2:*:*:*:*:*:*:*
CVSS
Base: None
Impact:
Exploitability:
CWE CWE-77
CAPEC
  • Manipulating Web Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
  • Command Injection
    An adversary looking to execute a command of their choosing, injects new items into an existing command thus modifying interpretation away from what was intended. Commands in this context are often standalone strings that are interpreted by a downstream component and cause specific responses. This type of attack is possible when untrusted values are used to build these command strings. Weaknesses in input validation or command construction can enable the attack and lead to successful exploitation.
  • Manipulating Writeable Configuration Files
    Generally these are manually edited files that are not in the preview of the system administrators, any ability on the attackers' behalf to modify these files, for example in a CVS repository, gives unauthorized access directly to the application, the same as authorized users.
  • LDAP Injection
    An attacker manipulates or crafts an LDAP query for the purpose of undermining the security of the target. Some applications use user input to create LDAP queries that are processed by an LDAP server. For example, a user might provide their username during authentication and the username might be inserted in an LDAP query during the authentication process. An attacker could use this input to inject additional commands into an LDAP query that could disclose sensitive information. For example, entering a * in the aforementioned query might return information about all users on the system. This attack is very similar to an SQL injection attack in that it manipulates a query to gather additional information or coerce a particular return value.
  • Command Delimiters
    An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
  • IMAP/SMTP Command Injection
    An attacker exploits weaknesses in input validation on IMAP/SMTP servers to execute commands on the server. Web-mail servers often sit between the Internet and the IMAP or SMTP mail server. User requests are received by the web-mail servers which then query the back-end mail server for the requested information and return this response to the user. In an IMAP/SMTP command injection attack, mail-server commands are embedded in parts of the request sent to the web-mail server. If the web-mail server fails to adequately sanitize these requests, these commands are then sent to the back-end mail server when it is queried by the web-mail server, where the commands are then executed. This attack can be especially dangerous since administrators may assume that the back-end server is protected against direct Internet access and therefore may not secure it adequately against the execution of malicious commands.
  • Manipulating Writeable Terminal Devices
    This attack exploits terminal devices that allow themselves to be written to by other users. The attacker sends command strings to the target terminal device hoping that the target user will hit enter and thereby execute the malicious command with their privileges. The attacker can send the results (such as copying /etc/passwd) to a known directory and collect once the attack has succeeded.
  • Exploiting Multiple Input Interpretation Layers
    An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: <parser1> --> <input validator> --> <parser2>. In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
Access
VectorComplexityAuthentication
Impact
ConfidentialityIntegrityAvailability
Last major update 14-10-2023 - 03:15
Published 20-02-2023 - 23:15
Last modified 14-10-2023 - 03:15
Back to Top