Cloudanix VulnDB

CVE-2014-0240

None

CVSS

—

EPSS

0.4%

Published

May 27, 2014

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A long-standing bug in an Apache add-on could let someone who already has an account on the server computer take over the entire machine.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
High
Impact
Privilege Gain
Component
Library
Class
Privilege Escalation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw allows a local user to escalate privileges by exploiting improper handling of setuid error codes returned when daemon mode is active on affected Linux kernels; success depends on the current count of running processes.

Why it matters to the business

A local attacker can obtain root-level access on systems running vulnerable versions, enabling full control of the web server and any data or services it hosts; because the issue is more than a decade old and has seen negligible exploitation, the risk is mainly to legacy or unpatched deployments.

How an attack unfolds

An attacker with a local shell account on a host using mod_wsgi in daemon mode crafts a scenario where setuid fails due to the kernel's process-count behavior, resulting in the worker process retaining elevated privileges that can then be used to compromise the system.

How to fix it

Upgrade mod_wsgi to version 3.5 or later and restart Apache; if the package cannot be updated, disable daemon mode or isolate the affected hosts until migration is possible.

How to confirm the fix worked

Verify the installed mod_wsgi version is 3.5 or newer; review Apache configuration to confirm daemon mode is either disabled or the updated module is loaded.

Typical attack path

  1. Obtain a local user account on the target host
  2. Confirm mod_wsgi is running in daemon mode
  3. Manipulate the number of processes to trigger the setuid error-handling flaw
  4. Execute code in the context of the privileged worker process

How to detect it

Search system and Apache logs for unexpected privilege changes or worker-process anomalies around the time of process-count spikes; review authentication and sudo logs for local users attempting escalation.

What your security team should do

  • Identify all hosts still running mod_wsgi before version 3.5
  • Schedule immediate upgrade or decommissioning of legacy instances
  • Harden local access controls and monitor for unusual process behavior on remaining systems

The record

The mod_wsgi module before 3.5 for Apache, when daemon mode is enabled, does not properly handle error codes returned by setuid when run on certain Linux kernels, which allows local users to gain privileges via vectors related to the number of running processes.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 mod-wsgi 0 3.5-1
Debian:12 mod-wsgi 0 3.5-1
Debian:13 mod-wsgi 0 3.5-1
Debian:6.0 mod-wsgi 0 3.3-2+deb6u1
Debian:7 mod-wsgi 0 3.3-4+deb7u1
Red Hat:enterprise_linux:6::client mod_wsgi 0 0:3.2-6.el6_5
Red Hat:enterprise_linux:6::client mod_wsgi-debuginfo 0 0:3.2-6.el6_5
Red Hat:enterprise_linux:6::computenode mod_wsgi 0 0:3.2-6.el6_5
Red Hat:enterprise_linux:6::computenode mod_wsgi-debuginfo 0 0:3.2-6.el6_5
Red Hat:enterprise_linux:6::server mod_wsgi 0 0:3.2-6.el6_5
Red Hat:enterprise_linux:6::server mod_wsgi-debuginfo 0 0:3.2-6.el6_5
Red Hat:enterprise_linux:6::workstation mod_wsgi 0 0:3.2-6.el6_5
Red Hat:enterprise_linux:6::workstation mod_wsgi-debuginfo 0 0:3.2-6.el6_5
Red Hat:enterprise_linux:7::client mod_wsgi 0 0:3.4-12.el7_0
Red Hat:enterprise_linux:7::client mod_wsgi-debuginfo 0 0:3.4-12.el7_0
Red Hat:enterprise_linux:7::computenode mod_wsgi 0 0:3.4-12.el7_0
Red Hat:enterprise_linux:7::computenode mod_wsgi-debuginfo 0 0:3.4-12.el7_0
Red Hat:enterprise_linux:7::server mod_wsgi 0 0:3.4-12.el7_0
Red Hat:enterprise_linux:7::server mod_wsgi-debuginfo 0 0:3.4-12.el7_0
Red Hat:enterprise_linux:7::workstation mod_wsgi 0 0:3.4-12.el7_0
Red Hat:enterprise_linux:7::workstation mod_wsgi-debuginfo 0 0:3.4-12.el7_0
Red Hat:rhel_software_collections:1::el6 python27-mod_wsgi 0 0:3.4-12.el6
Red Hat:rhel_software_collections:1::el6 python27-mod_wsgi-debuginfo 0 0:3.4-12.el6
Red Hat:rhel_software_collections:1::el6 python33-mod_wsgi 0 0:3.4-14.el6
Red Hat:rhel_software_collections:1::el6 python33-mod_wsgi-debuginfo 0 0:3.4-14.el6
Red Hat:rhel_software_collections:1::el7 python27-mod_wsgi 0 0:3.4-13.el7
Red Hat:rhel_software_collections:1::el7 python27-mod_wsgi-debuginfo 0 0:3.4-13.el7
Red Hat:rhel_software_collections:1::el7 python33-mod_wsgi 0 0:3.4-13.el7
Red Hat:rhel_software_collections:1::el7 python33-mod_wsgi-debuginfo 0 0:3.4-13.el7
Ubuntu:14.04:LTS mod-wsgi 0 3.4-4ubuntu2.1.14.04.1

Related vulnerabilities