Common Vulnerabilities and Exposures (CVE)

Public dictionary of known cybersecurity flaws, providing unique identifiers (CVE IDs), descriptions, and references for security vulnerabilities in software and hardware.

CVE-2016-3115

Assigned by [email protected]

Multiple CRLF injection vulnerabilities in session.c in sshd in OpenSSH before 7.2p2 allow remote authenticated users to bypass intended shell-command restrictions via crafted X11 forwarding data, related to the (1) do_authenticated1 and (2) session_x11_req functions.


Weaknesses (CWE)

CWE-93 — Improper Neutralization of CRLF Sequences ('CRLF Injection')

Chain: HTTP response splitting via CRLF in parameter related to URL.Chain: HTTP response splitting via CRLF in parameter related to URL.

CVSS

6.4

Base Score: 6.4/10 MEDIUM

Exploitability: 3.1/10

Impact: 2.7/10

Access Vector

  • Availability: NONE
  • Confidentiality: LOW
  • Integrity: LOW

Impact

  • Authentication: SINGLE
  • Complexity: LOW
  • Vector: NETWORK

Attack Patterns (CAPEC)

CAPEC-15 — Command Delimiters

An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or denylist input validation, as opposed to allowlist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or denylist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.

Typical severity: High

Prerequisites: Software's input validation or filtering must not detect and block presence of additional malicious command.

Solutions: Design: Perform allowlist validation against a positive specification for command length, type, and parameters. Design: Limit program privileges, so if commands circumvent program input validation or filter routines then commands do not running under a privileged account Implementation: Perform input validation for all remote content. Implementation: Use type conversions such as JDBC prepared statements.

CAPEC-81 — Web Server Logs Tampering

Web Logs Tampering attacks involve an attacker injecting, deleting or otherwise tampering with the contents of web logs typically for the purposes of masking other malicious behavior. Additionally, writing malicious data to log files may target jobs, filters, reports, and other agents that process the logs in an asynchronous attack pattern. This pattern of attack is similar to "Log Injection-Tampering-Forging" except that in this case, the attack is targeting the logs of the web server and not the application.

Typical severity: High

Prerequisites: Target server software must be a HTTP server that performs web logging.

Solutions: Design: Use input validation before writing to web log Design: Validate all log data before it is output

References

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/session.c
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/session.c.diff?r1=1.281&r2=1.282&f=h
http://lists.fedoraproject.org/pipermail/package-announce/2016-April/183101.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-April/183122.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-March/178838.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-March/179924.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-March/180491.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-May/184264.html
http://packetstormsecurity.com/files/136234/OpenSSH-7.2p1-xauth-Command-Injection-Bypass.html
http://rhn.redhat.com/errata/RHSA-2016-0465.html
http://rhn.redhat.com/errata/RHSA-2016-0466.html
http://seclists.org/fulldisclosure/2016/Mar/46
http://seclists.org/fulldisclosure/2016/Mar/47
http://www.openssh.com/txt/x11fwd.adv
http://www.oracle.com/technetwork/topics/security/bulletinapr2016-2952098.html
http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html
http://www.oracle.com/technetwork/topics/security/ovmbulletinjul2016-3090546.html
http://www.securityfocus.com/bid/84314
http://www.securitytracker.com/id/1035249
https://bto.bluecoat.com/security-advisory/sa121
https://github.com/tintinweb/pub/tree/master/pocs/cve-2016-3115
https://lists.debian.org/debian-lts-announce/2018/09/msg00010.html
https://security.gentoo.org/glsa/201612-18
https://www.exploit-db.com/exploits/39569/
https://www.freebsd.org/security/advisories/FreeBSD-SA-16:14.openssh.asc
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/session.c
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/session.c.diff?r1=1.281&r2=1.282&f=h
http://lists.fedoraproject.org/pipermail/package-announce/2016-April/183101.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-April/183122.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-March/178838.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-March/179924.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-March/180491.html
http://lists.fedoraproject.org/pipermail/package-announce/2016-May/184264.html
http://packetstormsecurity.com/files/136234/OpenSSH-7.2p1-xauth-Command-Injection-Bypass.html
http://rhn.redhat.com/errata/RHSA-2016-0465.html
http://rhn.redhat.com/errata/RHSA-2016-0466.html
http://seclists.org/fulldisclosure/2016/Mar/46
http://seclists.org/fulldisclosure/2016/Mar/47
http://www.openssh.com/txt/x11fwd.adv
http://www.oracle.com/technetwork/topics/security/bulletinapr2016-2952098.html
http://www.oracle.com/technetwork/topics/security/linuxbulletinapr2016-2952096.html
http://www.oracle.com/technetwork/topics/security/ovmbulletinjul2016-3090546.html
http://www.securityfocus.com/bid/84314
http://www.securitytracker.com/id/1035249
https://bto.bluecoat.com/security-advisory/sa121
https://github.com/tintinweb/pub/tree/master/pocs/cve-2016-3115
https://lists.debian.org/debian-lts-announce/2018/09/msg00010.html
https://security.gentoo.org/glsa/201612-18
https://www.exploit-db.com/exploits/39569/
https://www.freebsd.org/security/advisories/FreeBSD-SA-16:14.openssh.asc