CVE-2018-11319
Description
Syntastic (aka vim-syntastic) through 3.9.0 does not properly handle searches for configuration files (it searches the current directory up to potentially the root). This improper handling might be exploited for arbitrary code execution via a malicious gcc plugin, if an attacker has write access to a directory that is a parent of the base directory of the project being checked. NOTE: exploitation is more difficult after 3.8.0 because filename prediction may be needed.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1- Range: <=3.9.0
Patches
Vulnerability mechanics
Root cause
"Syntastic improperly searches for configuration files by recursing up to the filesystem root, which can be exploited via malicious plugins."
Attack vector
An attacker with write access to a parent directory of a project being checked by Syntastic can place a malicious configuration file. This file can contain arguments that instruct the compiler to load a malicious GCC plugin. If the plugin is loaded, it can execute arbitrary code on the system, as demonstrated by creating a file with specific content [ref_id=2]. Exploitation is more difficult after version 3.8.0 due to filename prediction requirements [NOTE: The original text mentioned this, but it's not a formal citation].
Affected code
The vulnerability lies in how Syntastic searches for configuration files for various linters. The commit `6d7c0b394e001233dd09ec473fbea2002c72632f` shows that default configuration filenames were removed and replaced with 'unset' for numerous linters, including `g:syntastic_ada_config_file`, `g:syntastic_asm_config_file`, and `g:syntastic_avrgcc_config_file` [ref_id=1].
What the fix does
The patch modifies Syntastic to no longer have default configuration filenames for linters. Instead, these defaults are unset, requiring users to explicitly define them. This change prevents Syntastic from automatically searching for and loading potentially malicious configuration files that could lead to arbitrary code execution [ref_id=1].
Preconditions
- inputWrite access to a directory that is a parent of the base directory of the project being checked.
- configA malicious GCC plugin must be created and placed where it can be loaded.
- configA Syntastic configuration file must be created in a parent directory, e.g., `.syntastic_avrgcc_config`.
Reproduction
1. Create a malicious GCC plugin (e.g., `plugin.cc`) that writes to `/tmp/test`. 2. Build the plugin: `gcc -I$(gcc -print-file-name=plugin)/include -fPIC -fno-rtti -O2 -shared plugin.cc -o /tmp/plugin.so`. 3. Create a Syntastic configuration file: `echo -fplugin=/tmp/plugin.so > /tmp/.syntastic_avrgcc_config`. 4. Ensure the plugin and config file are owned by the user running Syntastic. 5. Configure Syntastic to use the `avrgcc` checker (e.g., `let g:syntastic_cpp_checkers = ['avrgcc']`). 6. Edit a C++ file within a directory that has `/tmp` as a parent (e.g., `/tmp/foo.cc`) using Vim. 7. Check the content of `/tmp/test` to verify arbitrary code execution [ref_id=2].
Generated on Jun 2, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- www.debian.org/security/2018/dsa-4261mitrevendor-advisoryx_refsource_DEBIAN
- bugs.debian.org/894736mitrex_refsource_MISC
- github.com/vim-syntastic/syntastic/commit/6d7c0b394e001233dd09ec473fbea2002c72632fmitrex_refsource_MISC
- github.com/vim-syntastic/syntastic/issues/2170mitrex_refsource_MISC
- lists.debian.org/debian-lts-announce/2018/07/msg00036.htmlmitremailing-listx_refsource_MLIST
News mentions
0No linked articles in our index yet.