{"answers":{"affected":"It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-22741 exists.","fix":"Upgrade to a fixed version.","what":"CVE-2023-22741 is a critical memory corruption vulnerability in freeswitch sofia-sip, published on 19 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-22741 and fix it if it is affected.\n\nWhat it is: CVE-2023-22741 is a critical memory corruption vulnerability in freeswitch sofia-sip, published on 19 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-22741 exists.\n\nAffected product: freeswitch sofia-sip. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-22741/ (Markdown: https://insights.sbomify.com/CVE-2023-22741/index.md)","id":"CVE-2023-22741","markdown":"https://insights.sbomify.com/CVE-2023-22741/index.md","name":"CVE-2023-22741","record":{"aliases":["ALPINE-CVE-2023-22741","DEBIAN-CVE-2023-22741","DLA-3292-1","GHSA-8599-x7rq-fr54","MGASA-2023-0040","UBUNTU-CVE-2023-22741"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"SIP User-Agent library","requires_auth":"none","summary":"A heap overflow in the Sofia-SIP library allows remote attackers to achieve code execution via crafted STUN packets due to missing length checks.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"sofia-sip","vendor":"signalwire"}],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input"}],"description":"Sofia-SIP is an open-source SIP User-Agent library, compliant with the IETF RFC3261 specification. In affected versions Sofia-SIP **lacks both message length and attributes length checks** when it handles STUN packets, leading to controllable heap-over-flow. For example, in stun_parse_attribute(), after we get the attribute's type and length value, the length will be used directly to copy from the heap, regardless of the message's left size. Since network users control the overflowed length, and the data is written to heap chunks later, attackers may achieve remote code execution by heap grooming or other exploitation methods. The bug was introduced 16 years ago in sofia-sip 1.12.4 (plus some patches through 12/21/2006) to in tree libs with git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3774 d0543943-73ff-0310-b7d9-9358b9ac24b2. Users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"heap-over-flow in stun_parse_attribute in sofia-sip","id":"CVE-2023-22741","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"memory_corruption","year":"2023"},"n_packages":0,"n_references":3,"next":{"headline":"libgit2 fails to verify SSH keys by default","id":"CVE-2023-22742"},"packages":[],"prev":{"headline":"Discourse vulnerable to Allocation of Resources Without Limits via Chat drafts","id":"CVE-2023-22740"},"products":["sofia-sip"],"published":"2023-01-19","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-03-10","vendors":["freeswitch"]},"summary":"A heap overflow in the Sofia-SIP library allows remote attackers to achieve code execution via crafted STUN packets due to missing length checks.","url":"https://insights.sbomify.com/CVE-2023-22741/"}