{"id":"CVE-2018-16657","aliases":["DEBIAN-CVE-2018-16657","DLA-1503-1","DSA-4292-1","EUVD-2018-8459","GHSA-4477-4jr7-cfjq","UBUNTU-CVE-2018-16657","USN-6022-1"],"status":"published","title":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header...","description":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header causes a segmentation fault and crashes Kamailio. The reason is missing input validation in the crcitt_string_array core function for calculating a CRC hash for To tags. (An additional error is present in the check_via_address core function: this function also misses input validation.) This could result in denial of service and potentially the execution of arbitrary code.","severity":{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-07","score":0.03581,"percentile":0.89477,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-476"],"published":"2018-09-07T14:00:00Z","modified":"2026-10-24T10:30:48Z","fixes":[{"ecosystem":"Debian:12","package":"kamailio","fixed_in":["5.1.4-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"kamailio","fixed_in":["5.1.4-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"kamailio","fixed_in":["5.1.4-1"],"sources":["osv"]},{"ecosystem":"Debian:8","package":"kamailio","fixed_in":["4.2.0-2+deb8u5"],"sources":["osv"]},{"ecosystem":"Debian:9","package":"kamailio","fixed_in":["4.4.4-2+deb9u3"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"kamailio","fixed_in":["4.3.4-1.1ubuntu2.1+esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"kamailio","fixed_in":["5.1.2-1ubuntu2+esm1"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.4-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.4-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.4-1"}]}]},{"source":"osv","ecosystem":"Debian:8","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.2.0-2+deb8u5"}]}],"versions":["4.2.0-2","4.2.0-2+deb8u1","4.2.0-2+deb8u2","4.2.0-2+deb8u3","4.2.0-2+deb8u4"]},{"source":"osv","ecosystem":"Debian:9","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.4.4-2+deb9u3"}]}],"versions":["4.4.4-2","4.4.4-2+deb9u1","4.4.4-2+deb9u2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.4-1.1ubuntu2.1+esm1"}]}],"versions":["4.3.1-2ubuntu1","4.3.4-1.1ubuntu1","4.3.4-1.1ubuntu2","4.3.4-1.1ubuntu2.1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.2-1ubuntu2+esm1"}]}],"versions":["4.4.2-3ubuntu5","5.0.4-1ubuntu1","5.1.1-1ubuntu1","5.1.1-1ubuntu4","5.1.2-1ubuntu1","5.1.2-1ubuntu2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.3.4-1.1ubuntu2.1+esm1"}]}],"versions":["4.3.1-2ubuntu1","4.3.4-1.1ubuntu1","4.3.4-1.1ubuntu2","4.3.4-1.1ubuntu2.1"],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.1.2-1ubuntu2+esm1"}]}],"versions":["4.4.2-3ubuntu5","5.0.4-1ubuntu1","5.1.1-1ubuntu1","5.1.1-1ubuntu4","5.1.2-1ubuntu1","5.1.2-1ubuntu2"],"bundled":2},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"kamailio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.3.2-1ubuntu0.1~esm1"}]}],"versions":["5.2.3-1build3","5.2.3-1build4","5.3.0-2","5.3.1-1","5.3.2-1build1","5.3.2-1build2","5.3.2-1build3"],"bundled":2}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"kamailio","product":"kamailio"}],"references":[{"url":"https://www.debian.org/security/2018/dsa-4292","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","Third Party Advisory","advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/09/msg00013.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory"]},{"url":"https://skalatan.de/blog/advisory-hw-2018-06","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-16657"},{"url":"https://github.com/advisories/GHSA-4477-4jr7-cfjq"},{"url":"https://security-tracker.debian.org/tracker/CVE-2018-16657","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2018-16657","tags":["report"]},{"url":"https://github.com/kamailio/kamailio/commit/ad68e402ece8089f133c10de6ce319f9e28c0692","tags":["report"]},{"url":"https://github.com/kamailio/kamailio/commit/d67b2f9874ca23bd69f18df71b8f53b1b6151f6d","tags":["report"]},{"url":"https://github.com/kamailio/kamailio/commit/f07dabffef98c7088cdbc2bd695a4ae7a241b159","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-6022-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-16657","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2020-27507","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2018-16657","description":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header causes a segmentation fault and crashes Kamailio. The reason is missing input validation in the crcitt_string_array core function for calculating a CRC hash for To tags. (An additional error is present in the check_via_address core function: this function also misses input validation.) This could result in denial of service and potentially the execution of arbitrary code.","status":"published","published":"2018-09-07T14:00:00Z","modified":"2024-08-05T10:32:53.033Z","updated_at":"2026-11-02T14:35:11.072321Z"}],"euvd":[{"id":"EUVD-2018-8459","description":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header causes a segmentation fault and crashes Kamailio. The reason is missing input validation in the crcitt_string_array core function for calculating a CRC hash for To tags. (An additional error is present in the check_via_address core function: this function also misses input validation.) This could result in denial of service and potentially the execution of arbitrary code.","status":"published","published":"2018-09-07T14:00:00Z","modified":"2024-08-05T10:32:53Z","updated_at":"2026-11-03T02:39:40.768074Z"}],"ghsa":[{"id":"GHSA-4477-4jr7-cfjq","title":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header...","description":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header causes a segmentation fault and crashes Kamailio. The reason is missing input validation in the crcitt_string_array core function for calculating a CRC hash for To tags. (An additional error is present in the check_via_address core function: this function also misses input validation.) This could result in denial of service and potentially the execution of arbitrary code.","status":"published","published":"2022-05-13T01:19:17Z","modified":"2023-02-01T05:05:47Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T14:50:16.912878Z"}],"nvd":[{"id":"CVE-2018-16657","description":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header causes a segmentation fault and crashes Kamailio. The reason is missing input validation in the crcitt_string_array core function for calculating a CRC hash for To tags. (An additional error is present in the check_via_address core function: this function also misses input validation.) This could result in denial of service and potentially the execution of arbitrary code.","status":"published","published":"2018-09-07T14:29:03.397Z","modified":"2026-06-17T01:44:37.863Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-476"],"updated_at":"2026-11-02T14:04:38.672108Z"}],"osv":[{"id":"CVE-2018-16657","description":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header causes a segmentation fault and crashes Kamailio. The reason is missing input validation in the crcitt_string_array core function for calculating a CRC hash for To tags. (An additional error is present in the check_via_address core function: this function also misses input validation.) This could result in denial of service and potentially the execution of arbitrary code.","status":"published","published":"2018-09-07T14:29:03.397Z","modified":"2026-10-24T10:30:48.002141065Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:08.533609Z"},{"id":"DEBIAN-CVE-2018-16657","description":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header causes a segmentation fault and crashes Kamailio. The reason is missing input validation in the crcitt_string_array core function for calculating a CRC hash for To tags. (An additional error is present in the check_via_address core function: this function also misses input validation.) This could result in denial of service and potentially the execution of arbitrary code.","status":"published","published":"2018-09-07T14:29:03.397Z","modified":"2026-10-23T18:03:19.743704742Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:30.290351Z"},{"id":"UBUNTU-CVE-2018-16657","description":"In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with an invalid Via header causes a segmentation fault and crashes Kamailio. The reason is missing input validation in the crcitt_string_array core function for calculating a CRC hash for To tags. (An additional error is present in the check_via_address core function: this function also misses input validation.) This could result in denial of service and potentially the execution of arbitrary code.","status":"published","published":"2018-09-07T14:29:00Z","modified":"2026-02-04T02:16:30.100726Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:54:17.496046Z"},{"id":"DLA-1503-1","title":"kamailio - security update","status":"published","published":"2018-09-12T00:00:00Z","modified":"2026-03-09T01:01:52.598509Z","updated_at":"2026-11-02T15:46:09.777694Z"},{"id":"DSA-4292-1","title":"kamailio - security update","status":"published","published":"2018-09-11T00:00:00Z","modified":"2026-03-09T02:10:21.520289Z","updated_at":"2026-11-02T15:46:16.862196Z"},{"id":"USN-6022-1","title":"kamailio vulnerabilities","description":"It was discovered that Kamailio did not properly sanitize SIP messages under\ncertain circumstances. An attacker could use this vulnerability to cause a\ndenial of service or possibly execute arbitrary code. This issue only affected\nUbuntu 16.04 ESM and 18.04 ESM. (CVE-2018-16657)\n\nIt was discovered that Kamailio did not properly validate INVITE requests\nunder certain circumstances. An attacker could use this vulnerability to\ncause a denial of service or possibly execute arbitrary code. (CVE-2020-27507)\n","status":"published","published":"2023-04-14T17:20:51Z","modified":"2026-06-25T13:31:59.427119934Z","updated_at":"2026-11-02T16:58:16.738762Z"}]}}
