Where
-Infinity
0

On Thu, 13 Mar 2025, Eli Schwartz wrote: unzip will not permit you to run:

unzip foo.zip ./dir1/member

in order to extract an archive member named "dir1/member". There is no ./ member in the archive, it's not resolved like a filesystem path.

It will print a diagnostic: "caution: filename not matched: ./dir1/member" and exit 11 (no matching files were found.) Correct. Tried that, doesn't work. The whole unzip commandline parsing looks quite fragile to me: unzip [-Z] [-cflptTuvz[abjnoqsCDKLMUVWX$/:^]] file[.zip] [file(s) ...] [-x xfile(s) ...] [-d exdir] (e.g. it allows optional arguments to be followed after any number of member files).

Thanks, Christian -- "Problem solving under linux has never been the circus that it is under AIX." (By Pete Ehlke in comp.unix.aix)

On 3/13/25 12:14 AM, Solar Designer wrote: On Wed, Mar 12, 2025 at 10:22:23PM +0100, Christian Brabandt wrote: Therefore, Vim will try to work-around it by using the [-] glob when a filename starts with a - to protect unzip from parsing the filename as an argument, which is just an ugly work-around. I was puzzled by this. I expected that if you were running unzip via the shell, then the glob pattern would be expanded back to a simple dash before being passed to unzip, and if you were running unzip directly then the glob pattern would never be expanded, so the brackets would break the intended behavior. However, it appears that unzip itself expands glob patterns even for archive names (not only for matching files in archives)? I guess this is unexpected by many unzip users, and it likely allows for other attacks on unzip and on the zip.vim plugin, by providing a filename that includes glob patterns in it so that a different archive would be processed. It certainly surprised me! That being said, given the potential danger is I guess limited to extracting multiple archives you didn't expect but you still cannot control the location (without using the member-named-leading-dash-d trick as well) and you also have to convince the user to have multiple zip archives in the same directory, it seems harder to pull anything off like this.

Note: unzip won't re-parse globs in a directory segment, only the final filename segment. Otherwise, a workaround for the original issue would be to prefix the filename with ./ as we most recently discussed in this thread:

https://www.openwall.com/lists/oss-security/2024/11/06/1 unzip will not permit you to run:

unzip foo.zip ./dir1/member

in order to extract an archive member named "dir1/member". There is no ./ member in the archive, it's not resolved like a filesystem path.

It will print a diagnostic: "caution: filename not matched: ./dir1/member" and exit 11 (no matching files were found.)

-- Eli Schwartz

On Wed, Mar 12, 2025 at 10:22:23PM +0100, Christian Brabandt wrote: Therefore, Vim will try to work-around it by using the [-] glob when a filename starts with a - to protect unzip from parsing the filename as an argument, which is just an ugly work-around. I was puzzled by this. I expected that if you were running unzip via the shell, then the glob pattern would be expanded back to a simple dash before being passed to unzip, and if you were running unzip directly then the glob pattern would never be expanded, so the brackets would break the intended behavior. However, it appears that unzip itself expands glob patterns even for archive names (not only for matching files in archives)? I guess this is unexpected by many unzip users, and it likely allows for other attacks on unzip and on the zip.vim plugin, by providing a filename that includes glob patterns in it so that a different archive would be processed.

Otherwise, a workaround for the original issue would be to prefix the filename with ./ as we most recently discussed in this thread:

https://www.openwall.com/lists/oss-security/2024/11/06/1

Alexander

Eli, sorry for the duplicate. I messed up the reply...

On Mon, 20 Jan 2025, Eli Schwartz wrote: It seems strange to me to say that it is a vulnerability, for a vim option that accepts a full-blown script to also crash when fuzzed.

It's not an attack vector to crash /bin/bash when fed a malformed script, so why is there anything to comment on with regard to vim either? It was reported to us via the Security Advisory feature of Github and while I am convinced that this cannot be used to do any harm to users (except for crashing), there was still a small possibility that this may have been abused in the future.

So when in doubt, I go with the handling this as security relevant. How is this "medium" impact? The CVE calculator tends to exaggerate the score, even when being conservative with each metric.

Thanks, Christian

First published (updated )
Severity
5.5
Use After Free, Race Condition, Input Validation
AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Accounts. A logic issue was addressed with improved file handling.

1 / 70
Source: Apple
First published (updated )
Severity
5.5
AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

First published (updated )

buffer overflow when outputting colored output in xxd ===================================================== Date: 10.05.2024 Severity: Low

When outputting colored hexdumps using the -R command line flag, together with -g1 (group every byte), -c 256 (format 256 octets per line), -d (show offsets in decimal) and -o <largenumer> (add offset to the file position), the buffer used to write to may overflow.

Impact is low since the user must intentionally execute xxd with several non-default flags, but it may cause a crash of xxd.

The Vim project would like to thank github user Lennard Hofmann for reporting and fixing this issue in Vim patch 9.1.0404.

URLs: https://github.com/vim/vim/commit/67797191e039196128c69

Thanks, Chris -- Ein Torheit, über die viele Satiren gemacht worden und bei der jede neue Satire verliert, ist in der Wirklichkeit desto komischer. -- Jean Paul

Integer overflow in :history Ex-Command in Vim < 9.0.2068 =========================================================

Severity: Low

When using the :history ex-command, it's possible that the provided argument overflows the accepted value. Causing an Integer Overflow and potentially later an use-after-free.

This is not a major issue as most users probably won't use intentionally large values for the :history command

The issue is fixed in Vim version 9.0.2068.

This issue was reported on October 26th, 2023 by Cole Dilorenzo to the vim-security mailing list.

https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm https://github.com/vim/vim/commit/9198c1f2b1ddecde22af918541e0de2a32f0f45a

Thanks, Christian -- Wer den Sirenengesang der Werbung widersteht, ist mündiger Bürger. Und gefährdet Arbeitskräfte. -- Oliver Hassencamp

Severity
7.8
EPSS
0.03%
Use After Free
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Last updated 24 July 2024

1 / 2
Source: Ubuntu
First published (updated )
Severity
6.2
EPSS
0.02%
Null Pointer Dereference
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Last updated 24 July 2024

1 / 2
Source: Ubuntu
First published (updated )
Severity
7.8
Use After Free
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Last updated 24 July 2024

1 / 4
Source: Ubuntu
First published (updated )
Severity
7.8
Use After Free, Buffer Overflow
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.1331.

1 / 3
First published (updated )
Severity
7.8
Use After Free, Buffer Overflow
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.1848.

1 / 3
First published (updated )
Severity
5.5
Null Pointer Dereference
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

vim 8.2.2348 is affected by null pointer dereference, allows local attackers to cause a denial of service (DoS) via the exbufferall method.

First published (updated )
Severity
7.8
Divide by Zero
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Divide By Zero in vim/vim from 9.0.1367-1 to 9.0.1367-3

1 / 3
Source: Launchpad
First published (updated )
Severity
9.8
Buffer Overflow
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Buffer Overflow vulnerability in VIM v.8.1.2135 allows a remote attacker to execute arbitrary code via the operand parameter.

First published (updated )
Severity
6.8
Race Condition, Buffer Overflow, Use After Free, Input Validation, Integer Overflow
AV:L/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L

Accounts. A privacy issue was addressed with improved private data redaction for log entries.

1 / 47
Source: Apple
First published (updated )
Severity
8.4
Null Pointer Dereference
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

NULL Pointer Dereference in GitHub repository vim/vim prior to 9.0.1402.

First published (updated )
Severity
6.6
Null Pointer Dereference
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

NULL Pointer Dereference in GitHub repository vim/vim prior to 9.0.1392.

First published (updated )
Severity
7.3
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H

Incorrect Calculation of Buffer Size in GitHub repository vim/vim prior to 9.0.1378.

First published (updated )
Severity
7.3
Buffer Overflow
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 9.0.1376.

First published (updated )
Severity
7.8
Divide by Zero
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Divide By Zero in GitHub repository vim/vim prior to 9.0.1367.

First published (updated )
Severity
7.8
Divide by Zero, Use After Free, Input Validation, Integer Overflow, Buffer Overflow, Race Condition
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

AMD. A buffer overflow issue was addressed with improved memory handling.

1 / 65
Source: Apple
First published (updated )
Severity
7.8
Buffer Overflow, Use After Free, Input Validation, Integer Overflow, Race Condition
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

AMD. A buffer overflow issue was addressed with improved memory handling.

1 / 65
Source: Apple
First published (updated )
Severity
7.8
Null Pointer Dereference
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

A null pointer dereference issue was discovered in function guix11createblankmouse in guix11.c in vim 8.1.2269 thru 9.0.0339 allows attackers to cause denial of service or other unspecified impacts.

First published (updated )
Severity
7.8
Buffer Overflow, Input Validation, Integer Overflow, Use After Free, Race Condition
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

AMD. A buffer overflow issue was addressed with improved memory handling.

1 / 61
Source: Apple
First published (updated )
Severity
7.8
Buffer Overflow, Input Validation, Integer Overflow, Use After Free, Race Condition
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

AMD. A buffer overflow issue was addressed with improved memory handling.

1 / 61
Source: Apple
First published (updated )
Severity
7.8
Buffer Overflow, Input Validation, Integer Overflow, Use After Free, Race Condition
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

AMD. A buffer overflow issue was addressed with improved memory handling.

1 / 61
Source: Apple
First published (updated )
Severity
7.8
Buffer Overflow, Input Validation, Integer Overflow, Use After Free, Race Condition
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

AMD. A buffer overflow issue was addressed with improved memory handling.

1 / 61
Source: Apple
First published (updated )
Severity
6.8
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Floating Point Comparison with Incorrect Operator in GitHub repository vim/vim prior to 9.0.0804.

1 / 2
First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203