ID

VAR-200509-0223


CVE

CVE-2005-2799


TITLE

Linksys WRT54G apply.cgi Buffer overflow vulnerability

Trust: 0.6

sources: CNNVD: CNNVD-200509-138

DESCRIPTION

Buffer overflow in apply.cgi in Linksys WRT54G 3.01.03, 3.03.6, and possibly other versions before 4.20.7, allows remote attackers to execute arbitrary code via a long HTTP POST request. WRT54G v1.0 is prone to a remote security vulnerability. Successfully exploiting this issue may allow an attacker to execute arbitrary code in the context of the affected application. Failed exploit attempts may cause a denial-of-service condition. Linksys WRT54G Router Remote Administration apply.cgi Buffer Overflow Vulnerability iDEFENSE Security Advisory 09.13.05 www.idefense.com/application/poi/display?id=305&type=vulnerabilities September 13, 2005 I. BACKGROUND The Linksys WRT54G is a combination wireless access point, switch and router. More information is available at the following URL: http://www.linksys.com/products/product.asp?prid=508 II. The vulnerability specifically exists in the 'apply.cgi' handler of the httpd running on the internal interfaces, including the by default the wireless interface. This handler is used by the many of the configuration pages to perform the configuration management of the router. III. This could allow any operation to be performed on the router, including changing passwords and firewall configuration, installation of new firmware with other features, or denial of service. Exploitation of this vulnerability requires that an attacker can connect to the web management port of the router. The httpd is running by default but is only accessible via the LAN ports or the WLAN (wireless LAN). An attacker who can associate via the wireless interface to the network running a vulnerable httpd could send an exploit from a wireless device, and so not require direct physical access to an affected network. Additionally, if the httpd is configured to listen on the WAN (internet) interface, this vulnerability would be exploitable remotely over the internet. On some versions of the WRT54G firmware the buffer used to store the POST input, 'post_buf', is before a structure in memory containing pointers to the 'mime_handlers' structure, which contains function pointers for handling the various types of input. By overwriting this structure so some function pointers point into post_buf, it is possible to execute arbitrary commands. Overwriting these values with nulls will prevent access to the httpd on the system until the router is restarted. Overwriting these values with 'garbage' values will cause the httpd to crash but it will be restarted by a system monitoring process within 2 minutes, allowing multiple exploitation attempts. Although authentication checks are performed on access to this page, the code which reads in the buffer is executed even if authentication fails, so as to clear the input buffer from the client before returning an error message. This may allow an unauthenticated user to exploit the vulnerability. IV. DETECTION iDEFENSE has confirmed the existence of this vulnerability in version 3.01.03 of the firmware of the Linksys WRT54G, and has identified the same code is present in version 3.03.6. All versions prior to 4.20.7 may be affected. As this firmware is Open Source, and based on a reference implementation supplied by the original hardware maker, there may be other affected 3rd party firmware which use the same or similar code, and are thus also affected. V. WORKAROUND In order to mitigate exposure of the internal network to outside attackers, ensure encryption is enabled on the wireless interface. The exact settings to use are dependent on your wireless deployment policies. VI. VENDOR RESPONSE This vulnerability is addressed in firmware version 4.20.7 available for download at: http://www.linksys.com/servlet/Satellite?childpagename=US%2FLayout &packedargs=c%3DL_Download_C2%26cid%3D1115417109974%26sku%3D112491680264 5 &pagename=Linksys%2FCommon%2FVisitorWrapper VII. CVE INFORMATION The Common Vulnerabilities and Exposures (CVE) project has assigned the name CAN-2005-2799 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems. VIII. DISCLOSURE TIMELINE 06/07/2005 Initial vendor notification 06/07/2005 Initial vendor response 09/13/2005 Coordinated public disclosure IX. CREDIT This vulnerability was discovered by Greg MacManus of iDEFENSE Labs. Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp Free tools, research and upcoming events http://labs.idefense.com X. LEGAL NOTICES Copyright (c) 2005 iDEFENSE, Inc. Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDEFENSE. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email customerservice@idefense.com for permission. Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information

Trust: 1.35

sources: NVD: CVE-2005-2799 // BID: 88779 // VULHUB: VHN-14008 // PACKETSTORM: 40042

AFFECTED PRODUCTS

vendor:linksysmodel:wrt54gscope:eqversion:3.03.6

Trust: 1.6

vendor:linksysmodel:wrt54gscope:eqversion:3.01.3

Trust: 1.6

vendor:linksysmodel:wrt54gscope:eqversion:v3.03.3.6

Trust: 0.3

sources: BID: 88779 // NVD: CVE-2005-2799 // CNNVD: CNNVD-200509-138

CVSS

SEVERITY

CVSSV2

CVSSV3

NVD: CVE-2005-2799
value: HIGH

Trust: 1.0

CNNVD: CNNVD-200509-138
value: HIGH

Trust: 0.6

VULHUB: VHN-14008
value: HIGH

Trust: 0.1

NVD:
severity: HIGH
baseScore: 7.5
vectorString: AV:N/AC:L/AU:N/C:P/I:P/A:P
accessVector: NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: PARTIAL
availabilityImpact: PARTIAL
exploitabilityScore: 10.0
impactScore: 6.4
acInsufInfo: FALSE
obtainAllPrivilege: FALSE
obtainUserPrivilege: TRUE
obtainOtherPrivilege: FALSE
userInteractionRequired: FALSE
version: 2.0

Trust: 1.0

VULHUB: VHN-14008
severity: HIGH
baseScore: 7.5
vectorString: AV:N/AC:L/AU:N/C:P/I:P/A:P
accessVector: NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: PARTIAL
availabilityImpact: PARTIAL
exploitabilityScore: 10.0
impactScore: 6.4
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.1

sources: VULHUB: VHN-14008 // NVD: CVE-2005-2799 // CNNVD: CNNVD-200509-138

PROBLEMTYPE DATA

problemtype:NVD-CWE-Other

Trust: 1.0

sources: NVD: CVE-2005-2799

THREAT TYPE

remote

Trust: 0.7

sources: PACKETSTORM: 40042 // CNNVD: CNNVD-200509-138

TYPE

buffer overflow

Trust: 0.6

sources: CNNVD: CNNVD-200509-138

CONFIGURATIONS

sources: NVD: CVE-2005-2799

EXPLOIT AVAILABILITY

sources: VULHUB: VHN-14008

EXTERNAL IDS

db:NVDid:CVE-2005-2799

Trust: 2.1

db:CNNVDid:CNNVD-200509-138

Trust: 0.7

db:IDEFENSEid:20050913 LINKSYS WRT54G ROUTER REMOTE ADMINISTRATION APPLY.CGI BUFFER OVERFLOW VULNERABILITY

Trust: 0.6

db:BIDid:88779

Trust: 0.3

db:PACKETSTORMid:40042

Trust: 0.2

db:EXPLOIT-DBid:10028

Trust: 0.1

db:EXPLOIT-DBid:16854

Trust: 0.1

db:PACKETSTORMid:82237

Trust: 0.1

db:SEEBUGid:SSVID-71354

Trust: 0.1

db:SEEBUGid:SSVID-67031

Trust: 0.1

db:VULHUBid:VHN-14008

Trust: 0.1

sources: VULHUB: VHN-14008 // BID: 88779 // PACKETSTORM: 40042 // NVD: CVE-2005-2799 // CNNVD: CNNVD-200509-138

REFERENCES

url:http://www.idefense.com/application/poi/display?id=305&type=vulnerabilities

Trust: 2.0

url:http://www.idefense.com/application/poi/display?id=305&type=vulnerabilities

Trust: 0.1

url:http://www.linksys.com/products/product.asp?prid=508

Trust: 0.1

url:http://www.idefense.com/poi/teams/vcp.jsp

Trust: 0.1

url:http://www.linksys.com/servlet/satellite?childpagename=us%2flayout

Trust: 0.1

url:https://nvd.nist.gov/vuln/detail/cve-2005-2799

Trust: 0.1

url:http://cve.mitre.org),

Trust: 0.1

url:http://labs.idefense.com

Trust: 0.1

sources: VULHUB: VHN-14008 // BID: 88779 // PACKETSTORM: 40042 // NVD: CVE-2005-2799 // CNNVD: CNNVD-200509-138

CREDITS

Greg MacManus

Trust: 0.6

sources: CNNVD: CNNVD-200509-138

SOURCES

db:VULHUBid:VHN-14008
db:BIDid:88779
db:PACKETSTORMid:40042
db:NVDid:CVE-2005-2799
db:CNNVDid:CNNVD-200509-138

LAST UPDATE DATE

2023-12-18T13:54:15.426000+00:00


SOURCES UPDATE DATE

db:VULHUBid:VHN-14008date:2008-09-05T00:00:00
db:BIDid:88779date:2016-07-06T14:33:00
db:NVDid:CVE-2005-2799date:2008-09-05T20:52:43.737
db:CNNVDid:CNNVD-200509-138date:2005-10-20T00:00:00

SOURCES RELEASE DATE

db:VULHUBid:VHN-14008date:2005-09-15T00:00:00
db:BIDid:88779date:2005-09-15T00:00:00
db:PACKETSTORMid:40042date:2005-09-14T06:59:46
db:NVDid:CVE-2005-2799date:2005-09-15T20:03:00
db:CNNVDid:CNNVD-200509-138date:2005-09-15T00:00:00