{"schemaVersion":3,"id":"CVE-2018-13348","aliases":["GHSA-3v62-ww8w-758m","PYSEC-2018-90","UBUNTU-CVE-2018-13348","DEBIAN-CVE-2018-13348"],"status":"published","duplicateOf":null,"title":null,"description":"The mpatch_decode function in mpatch.c in Mercurial before 4.6.1 mishandles certain situations where there should be at least 12 bytes remaining after the current position in the patch data, but actually are not, aka OVE-20180430-0001.","dates":{"published":"2018-07-06T00:00:00.000Z","modified":"2024-08-05T09:00:35.140Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.0","versionLabel":"v3.0","source":"NVD","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.0","versionLabel":"v3.0","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":5,"severity":"medium","vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":8.7,"severity":"high","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Pypi","score":7.5,"severity":"high","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Ubuntu","score":7.5,"severity":"high","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","exploitability":10,"impact":6,"computed":true},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Debian","score":7.5,"severity":"high","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","exploitability":10,"impact":6,"computed":true}]},"epss":{"probability":0.02104,"percentile":0.81451,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.02104},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02077,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02104,"percentile":0.81451}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02077,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02104,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02104,"percentile":0.81451}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-20","name":"Improper Input Validation","description":"The product receives input or data, but it does\n        not validate or incorrectly validates that the input has the\n        properties that are required to process the data safely and\n        correctly.","type":"weakness","status":"Stable","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/20.html"}],"affected":[{"vendor":"debian","product":"mercurial","name":"mercurial","label":"mercurial","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/mercurial","purlType":"deb","versions":[{"text":"< 4.6.1-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.6.1-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"mercurial","name":"mercurial","label":"mercurial","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/mercurial","purlType":"deb","versions":[{"text":"< 2.8.2-1ubuntu1.4","noFixRecorded":false,"fixedIn":null},{"text":"< 3.7.3-1ubuntu1.1","noFixRecorded":false,"fixedIn":null},{"text":"< 4.5.3-1ubuntu2.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2.8.2-1ubuntu1.4 | < 3.7.3-1ubuntu1.1 | < 4.5.3-1ubuntu2.1","eol":null,"hubHref":null},{"vendor":"mercurial","product":"mercurial","name":"mercurial","label":"mercurial","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 4.6.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.6.1","eol":null,"hubHref":"/vendor/mercurial/mercurial"},{"vendor":"PyPI","product":"mercurial","name":"mercurial","label":"mercurial","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/mercurial","purlType":"pypi","versions":[{"text":"< 4.6.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 4.6.1","eol":null,"hubHref":null}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://www.mercurial-scm.org/repo/hg/rev/90a274965de7","label":"www.mercurial-scm.org/repo/hg/rev/90a274965de7","hostname":"www.mercurial-scm.org","tags":["X Refsource MISC","Patch","Vendor Advisory","WEB","REPORT"]},{"url":"https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.6.1_.282018-06-06.29","label":"www.mercurial-scm.org/wiki/WhatsNew","hostname":"www.mercurial-scm.org","tags":["X Refsource MISC","Vendor Advisory","WEB","REPORT"]},{"url":"https://lists.debian.org/debian-lts-announce/2020/07/msg00032.html","label":"lists.debian.org/debian-lts-announce/2020/07/msg00032.html","hostname":"lists.debian.org","tags":["Mailing List","X Refsource MLIST","WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-13348","label":"nvd.nist.gov/vuln/detail/CVE-2018-13348","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2018-90.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/mercurial/PYSEC-2018-90.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-3v62-ww8w-758m","label":"github.com/advisories/GHSA-3v62-ww8w-758m","hostname":"github.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2018-13348","label":"ubuntu.com/security/CVE-2018-13348","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-13348","label":"www.cve.org/CVERecord?id=CVE-2018-13348","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2018-13348","label":"security-tracker.debian.org/tracker/CVE-2018-13348","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":["DLA-1414-1","DLA-2293-1","MGASA-2018-0355","OPENSUSE-SU-2024:10586-1","SUSE-SU-2018:1990-1","SUSE-SU-2018:1996-1","SUSE-SU-2018:1998-1"],"duplicates":[],"related":["OPENSUSE-SU-2024:10586-1","SUSE-SU-2018:1990-1","SUSE-SU-2018:1996-1","SUSE-SU-2018:1998-1"]},"timeline":[{"kind":"published","date":"2018-07-06T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-05T09:00:35.140Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":30,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T19:44:53.188Z","stale":false,"partial":false}}