Quantum Secular Labs / Blog / Advisories

CVE-2016-1903: PHP: Memory corruption

CVE-2016-1903 is rated critical with a CVSS v3.0 base score of 9.1 and affects PHP. Per its scoring, it can be exploited over the network, without authentication, without any user interaction.

Vulnerability description

The gdImageRotateInterpolated function in ext/gd/libgd/gd_interpolation.c in PHP before 5.5.31, 5.6.x before 5.6.17, and 7.x before 7.0.2 allows remote attackers to obtain sensitive information or cause a denial of service (out-of-bounds read and application crash) via a large bgd_color argument to the imagerotate function.

Severity breakdown

CVSS v3.0 9.1: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

  • Attack vector: Network. Exploitable remotely over the network, with no need for local or physical access.
  • Attack complexity: Low. No special conditions; the attack can be repeated reliably.
  • Privileges required: None. No account or prior access is needed.
  • User interaction: None. No action from any user is needed.
  • Scope: Unchanged. Impact stays within the vulnerable component.
  • Confidentiality impact: High. Total loss of confidentiality; sensitive data can be fully disclosed.
  • Integrity impact: None. No loss of integrity.
  • Availability impact: High. Total loss of availability; the component can be shut down.

Underlying weakness

CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer

The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary.

CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.

Affected products

  • PHP: up to and including 5.5.30; 5.6.0 alpha1; 5.6.0 alpha2; 5.6.0 alpha3; 5.6.0 alpha4; 5.6.0 alpha5; 5.6.0 beta1; 5.6.0 beta2; 5.6.0 beta3; 5.6.0 beta4; 5.6.1; 5.6.2

References