1. CVE archive
  2. 2012
  3. CVE-2012-2040

CVE-2012-2040

9.3 Critical severity CVSS v2.0 · source NVD AV:N/AC:M/Au:N/C:C/I:C/A:C 9.3 – Critical

Description

Untrusted search path vulnerability in the installer in Adobe Flash Player before 10.3.183.20 and 11.x before 11.3.300.257 on Windows and Mac OS X; before 10.3.183.20 and 11.x before 11.2.202.236 on Linux; before 11.1.111.10 on Android 2.x and 3.x; and before 11.1.115.9 on Android 4.x, and Adobe AIR before 3.3.0.3610, allows local users to gain privileges via a Trojan horse executable file in an unspecified directory.

Affected products

VendorProductVersionPlatform
adobe air <= 3.2.0.2070 –
adobe flash player <= 11.2.202.235 –
adobe flash player <= 11.1.115.8 –
adobe flash player <= 11.1.111.9 –
opensuse opensuse 11.4 –
opensuse opensuse 12.1 –
suse linux enterprise desktop 10 sp4 –
suse linux enterprise desktop 11 sp1 –
suse linux enterprise desktop 11 sp2 –
All 1,084 Adobe Flash Player vulnerabilities
All 413 Adobe Air vulnerabilities

Vulnerability type

CWE-426 Untrusted Search Path

The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.

Some of the most common variants of untrusted search path are: In various UNIX and Linux-based systems, the PATH environment variable may be consulted to locate executable programs, and LD_PRELOAD may be used to locate a separate library. Programming languages may have their own paths for locating code, e.g. PERL5LIB in Perl. In various Microsoft-based systems, the PATH environment variable is consulted to locate a DLL, if the DLL is not found in other paths that appear earlier in the search order.

Impact on systems

ScopeImpact
Integrity, Confidentiality, Availability, Access Control Gain Privileges or Assume Identity, Execute Unauthorized Code or Commands
There is the potential for arbitrary code execution with privileges of the vulnerable program. If the product uses a search path to locate critical resources such as programs or libraries, then an attacker could modify that search path to point to a malicious program/library, which the targeted product would then execute.
Availability DoS: Crash, Exit, or Restart
The program could be redirected to the wrong files, potentially triggering a crash or hang when the targeted file is too large or does not have the expected format.
Confidentiality Read Files or Directories
The program could access unauthorized data and send the output of unauthorized files to the attacker.
Other Varies by Context
The problem extends to any type of critical resource that the product trusts. For example, the attacker could modify configuration in unexpected ways.

How to prevent it

Architecture and Design · Implementation · Attack Surface Reduction Hard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.
Implementation When invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code refer to these paths.
Implementation Remove or restrict all environment settings before invoking other programs. This includes the PATH environment variable, LD_LIBRARY_PATH, and other settings that identify the location of code libraries, and any application-specific search paths.
Implementation Check your search path before use and remove any elements that are likely to be unsafe, such as the current working directory or a temporary files directory.
Implementation Use other functions that require explicit paths. Making use of any of the other readily available functions that require explicit paths is a safe way to avoid this problem. For example, system() in C does not require a full path since the shell can take care of it, while execl() and execv() require a full path.

All 702 CWE-426 CVEs, with trend and prevention

Source: MITRE CWE catalog · cwe.mitre.org