CVE-2012-5958: Software Security Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-mpm3-m3f6-fx5w
CWE-119
Published
Advisory Summary

CVE-2012-5958 is a HIGH security vulnerability vulnerability (CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer) affecting Software libraries in the Maven ecosystem. The weakness occurs when the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.. Remediation is available in the latest vendor maintenance releases.

CVE-2012-5958 at a Glance

CVE Identifier CVE-2012-5958
GHSA Identifier GHSA-mpm3-m3f6-fx5w
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
Affected Product Software
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2012-5958

To remediate this vulnerability, upgrade all affected Software dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2012-5958, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree

Analyze the terminal output to locate any version of Software in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The mvn dependency:tree command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer, where the product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. this may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data. In Software, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Stack-based buffer overflow in the unique_service_name function in ssdp/ssdp_server.c in the SSDP parser in the portable SDK for UPnP Devices (aka libupnp, formerly the Intel SDK for UPnP devices) before 1.6.18 allows remote attackers to execute arbitrary code via a UDP packet with a crafted string that is not properly handled after a certain pointer subtraction.

References

NVD — CVE-2012-5958 NVD
https://nvd.nist.gov/vuln/detail/CVE-2012-5958
Software Security Information SECURITY
https://community.rapid7.com/community/infosec/blog/2013/01/29/security-flaws-in-universal-plug-and-play-unplug-dont-play
Software Release RELEASE
https://community.rapid7.com/servlet/JiveServlet/download/2150-1-16596/SecurityFlawsUPnP.pdf
community.rapid7.com/servlet/servlet.fil... WEB
https://community.rapid7.com/servlet/servlet.FileDownload?file=00P1400000cCaFb
wiki.mageia.org/en/support/advisori... WEB
https://wiki.mageia.org/en/Support/Advisories/MGASA-2013-0037
Software Security Information SECURITY
https://www.tenable.com/security/research/tra-2017-10
lists.opensuse.org/opensuse-updates/20... WEB
http://lists.opensuse.org/opensuse-updates/2013-02/msg00013.html
Software Security Information SECURITY
http://packetstormsecurity.com/files/160242/libupnp-1.6.18-Denial-Of-Service.html
pupnp.sourceforge.net/changelog WEB
http://pupnp.sourceforge.net/ChangeLog
Software Security Information SECURITY
http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20130129-upnp
tsd.dlink.com.tw/temp/pmd/12879/dsr-... WEB
http://tsd.dlink.com.tw/temp/PMD/12879/DSR-500_500N_1000_1000N_A1_Release_Notes_FW_v1.08B77_WW.pdf
tsd.dlink.com.tw/temp/pmd/12960/dsr-... WEB
http://tsd.dlink.com.tw/temp/PMD/12960/DSR-150N_A2_Release_Notes_FW_v1.05B64_WW.pdf
tsd.dlink.com.tw/temp/pmd/12966/dsr-... WEB
http://tsd.dlink.com.tw/temp/PMD/12966/DSR-150_A1_A2_Release_Notes_FW_v1.08B44_WW.pdf
tsd.dlink.com.tw/temp/pmd/13039/dsr-... WEB
http://tsd.dlink.com.tw/temp/PMD/13039/DSR-250_250N_A1_A2_Release_Notes_FW_v1.08B44_WW_RU.pdf
Software Security Information SECURITY
http://www.debian.org/security/2013/dsa-2614
Software Security Information SECURITY
http://www.debian.org/security/2013/dsa-2615
www.kb.cert.org/vuls/id/922681 WEB
http://www.kb.cert.org/vuls/id/922681
Software Security Information SECURITY
http://www.mandriva.com/security/advisories?name=MDVSA-2013:098
Software Security Information SECURITY
http://www.securityfocus.com/bid/57602

Frequently Asked Questions

What is CVE-2012-5958?
CVE-2012-5958 is a security vulnerability in Software classified as a security vulnerability vulnerability under CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.
Which Software versions are affected?
Affected versions include releases prior to current release patches.
What version fixes CVE-2012-5958?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
What CWE is associated with CVE-2012-5958?
CVE-2012-5958 is classified under 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. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.).
How can I check Maven dependencies for CVE-2012-5958?
Run the dependency tree command: 'mvn dependency:tree'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mpm3-m3f6-fx5w",
  "modified" : "2022-05-13T01:13:21Z",
  "published" : "2022-05-13T01:13:21Z",
  "aliases" : [ "CVE-2012-5958" ],
  "details" : "Stack-based buffer overflow in the unique_service_name function in ssdp/ssdp_server.c in the SSDP parser in the portable SDK for UPnP Devices (aka libupnp, formerly the Intel SDK for UPnP devices) before 1.6.18 allows remote attackers to execute arbitrary code via a UDP packet with a crafted string that is not properly handled after a certain pointer subtraction.",
  "severity" : [ ],
  "affected" : [ ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-5958"
  }, {
    "type" : "WEB",
    "url" : "https://community.rapid7.com/community/infosec/blog/2013/01/29/security-flaws-in-universal-plug-and-play-unplug-dont-play"
  }, {
    "type" : "WEB",
    "url" : "https://community.rapid7.com/servlet/JiveServlet/download/2150-1-16596/SecurityFlawsUPnP.pdf"
  }, {
    "type" : "WEB",
    "url" : "https://community.rapid7.com/servlet/servlet.FileDownload?file=00P1400000cCaFb"
  }, {
    "type" : "WEB",
    "url" : "https://wiki.mageia.org/en/Support/Advisories/MGASA-2013-0037"
  }, {
    "type" : "WEB",
    "url" : "https://www.tenable.com/security/research/tra-2017-10"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2013-02/msg00013.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/160242/libupnp-1.6.18-Denial-Of-Service.html"
  }, {
    "type" : "WEB",
    "url" : "http://pupnp.sourceforge.net/ChangeLog"
  }, {
    "type" : "WEB",
    "url" : "http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20130129-upnp"
  }, {
    "type" : "WEB",
    "url" : "http://tsd.dlink.com.tw/temp/PMD/12879/DSR-500_500N_1000_1000N_A1_Release_Notes_FW_v1.08B77_WW.pdf"
  }, {
    "type" : "WEB",
    "url" : "http://tsd.dlink.com.tw/temp/PMD/12960/DSR-150N_A2_Release_Notes_FW_v1.05B64_WW.pdf"
  }, {
    "type" : "WEB",
    "url" : "http://tsd.dlink.com.tw/temp/PMD/12966/DSR-150_A1_A2_Release_Notes_FW_v1.08B44_WW.pdf"
  }, {
    "type" : "WEB",
    "url" : "http://tsd.dlink.com.tw/temp/PMD/13039/DSR-250_250N_A1_A2_Release_Notes_FW_v1.08B44_WW_RU.pdf"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2013/dsa-2614"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2013/dsa-2615"
  }, {
    "type" : "WEB",
    "url" : "http://www.kb.cert.org/vuls/id/922681"
  }, {
    "type" : "WEB",
    "url" : "http://www.mandriva.com/security/advisories?name=MDVSA-2013:098"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/57602"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-119" ],
    "severity" : "HIGH",
    "github_reviewed" : false,
    "github_reviewed_at" : null,
    "nvd_published_at" : "2013-01-31T21:55:00Z"
  }
}