Ubuntu 5.10 / 6.06 LTS : mysql-dfsg-4.1, mysql-dfsg-5.0 vulnerability (USN-303-1)

high Nessus Plugin ID 27878

Synopsis

The remote Ubuntu host is missing one or more security-related patches.

Description

A SQL injection vulnerability has been discovered when using less popular multibyte encodings (such as SJIS, or BIG5) which contain valid multibyte characters that end with the byte 0x5c (the representation of the backslash character >>\<< in ASCII).

Many client libraries and applications use the non-standard, but popular way of escaping the >>'<< character by replacing all occurences of it with >>\'<<. If a client application uses one of the affected encodings and does not interpret multibyte characters, and an attacker supplies a specially crafted byte sequence as an input string parameter, this escaping method would then produce a validly-encoded character and an excess >>'<< character which would end the string.
All subsequent characters would then be interpreted as SQL code, so the attacker could execute arbitrary SQL commands.

The updated packages fix the mysql_real_escape_string() function to escape quote characters in a safe way. If you use third-party software which uses an ad-hoc method of string escaping, you should convert them to use mysql_real_escape_string() instead, or at least use the standard SQL method of escaping >>'<< with >>''<<.

Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.

Solution

Update the affected packages.

See Also

https://usn.ubuntu.com/303-1/

Plugin Details

Severity: High

ID: 27878

File Name: ubuntu_USN-303-1.nasl

Version: 1.16

Type: local

Agent: unix

Published: 11/10/2007

Updated: 1/19/2021

Supported Sensors: Frictionless Assessment AWS, Frictionless Assessment Azure, Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 5.8

CVSS v2

Risk Factor: High

Base Score: 7.5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

Vulnerability Information

CPE: p-cpe:/a:canonical:ubuntu_linux:libmysqlclient14, p-cpe:/a:canonical:ubuntu_linux:libmysqlclient14-dev, p-cpe:/a:canonical:ubuntu_linux:libmysqlclient15-dev, p-cpe:/a:canonical:ubuntu_linux:libmysqlclient15off, p-cpe:/a:canonical:ubuntu_linux:mysql-client, p-cpe:/a:canonical:ubuntu_linux:mysql-client-4.1, p-cpe:/a:canonical:ubuntu_linux:mysql-client-5.0, p-cpe:/a:canonical:ubuntu_linux:mysql-common, p-cpe:/a:canonical:ubuntu_linux:mysql-common-4.1, p-cpe:/a:canonical:ubuntu_linux:mysql-server, p-cpe:/a:canonical:ubuntu_linux:mysql-server-4.1, p-cpe:/a:canonical:ubuntu_linux:mysql-server-5.0, cpe:/o:canonical:ubuntu_linux:5.10, cpe:/o:canonical:ubuntu_linux:6.06:-:lts

Required KB Items: Host/cpu, Host/Debian/dpkg-l, Host/Ubuntu, Host/Ubuntu/release

Patch Publication Date: 6/16/2006

Reference Information

CVE: CVE-2006-2753

USN: 303-1