{"id":"CVE-2021-27516","aliases":["GHSA-p6j9-7xhc-rhwp"],"summary":"URI.js (aka urijs) before 1.19.6 mishandles certain uses of backslash such as http:\\/ and interprets the URI as a relative path.","published_at":"2021-02-21T23:29:56Z","modified_at":"2024-08-03T21:26:09.101Z","products":[],"rating":{"severity":"high","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","attack_path":"internet_unauthenticated","user_interaction":false,"malicious":false,"red_hat":"Important","vendor_ratings":[{"source":"Red Hat","rating":"Important"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.025140000507235527,"percentile":0.8514299988746643,"date":"2026-11-19T00:00:00Z"},"priority":9.5,"details":"URI.js (aka urijs) before 1.19.6 mishandles certain uses of backslash such as http:\\/ and interprets the URI as a relative path.","affected_stack":[],"affected_other":[{"ecosystem":"NVD","package":"uri.js_project:uri.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.19.6"}]}],"fixed":["1.19.6"],"provider":"nvd","source":"CVE-2021-27516","relation":"self"},{"ecosystem":"npm","package":"urijs","purl":"pkg:npm/urijs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.19.6"}]}],"fixed":["1.19.6"],"provider":"osv","source":"GHSA-p6j9-7xhc-rhwp","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Quay v3","cpe":"cpe:/a:redhat:quay:3::el8","status":"fixed","packages":["quay/quay-rhel8"],"package_count":1,"fixed":[],"advisories":["RHSA-2021:3917"],"provider":"redhat-vex","source":"CVE-2021-27516"},{"vendor":"Red Hat","product":"Quay v3","cpe":"cpe:/a:redhat:quay:3::el8","status":"not_affected","packages":["quay/clair-rhel8","quay/quay-bridge-operator-bundle","quay/quay-bridge-operator-rhel8","quay/quay-builder-qemu-rhcos-rhel8","quay/quay-builder-rhel8","quay/quay-container-security-operator-bundle","quay/quay-container-security-operator-rhel8","quay/quay-operator-bundle","quay/quay-operator-rhel8"],"package_count":9,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-27516"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/application-ui-rhel8","rhacm2/mcm-topology-rhel8"],"package_count":2,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-27516"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2021-27516","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2021-27516","license":"CC-BY-4.0","published_at":"2021-02-21T23:29:56Z","modified_at":"2024-08-03T21:26:09.101Z","summary":"URI.js (aka urijs) before 1.19.6 mishandles certain uses of backslash such as http:\\/ and interprets the URI as a relative path.","details":"URI.js (aka urijs) before 1.19.6 mishandles certain uses of backslash such as http:\\/ and interprets the URI as a relative path.","severity":[],"affected":[],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/medialize/URI.js/commit/a1ad8bcbc39a4d136d7e252e76e957f3ece70839"},{"type":"WEB","url":"https://github.com/medialize/URI.js/releases/tag/v1.19.6"},{"type":"WEB","url":"https://advisory.checkmarx.net/advisory/CX-2021-4305"}]},{"provider":"nvd","source_id":"CVE-2021-27516","relation":"self","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27516","severity":[],"affected":[{"ecosystem":"NVD","package":"uri.js_project:uri.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.19.6"}]}],"fixed":["1.19.6"],"provider":"nvd","source":"CVE-2021-27516","relation":"self"}],"product_status":[],"references":[]},{"provider":"osv","source_id":"GHSA-p6j9-7xhc-rhwp","relation":"self","url":"https://osv.dev/vulnerability/GHSA-p6j9-7xhc-rhwp","license":"CC-BY-4.0","published_at":"2021-03-01T20:03:53Z","modified_at":"2023-11-08T04:05:24.794143Z","summary":"URIjs Hostname spoofing via backslashes in URL","details":"### Impact\nIf using affected versions to determine a URL's hostname, the hostname can be spoofed by using a backslash (`\\`) character as part of the scheme delimiter, e.g. `scheme:/\\hostname`. If the hostname is used in security decisions, the decision may be incorrect.\n\nDepending on library usage and attacker intent, impacts may include allow/block list bypasses, SSRF attacks, open redirects, or other undesired behavior.\n\nExample URL: `https:/\\expected-example.com/path`\nEscaped string: `https:/\\\\expected-example.com/path` (JavaScript strings must escape backslash)\n\nAffected versions incorrectly return no hostname. Patched versions correctly return `expected-example.com`. Patched versions match the behavior of other parsers which implement the [WHATWG URL specification](https://url.spec.whatwg.org/), including web browsers and [Node's built-in URL class](https://nodejs.org/api/url.html).\n\n### Patches\nVersion 1.19.6 is patched against all known payload variants.\n\n### References\nhttps://github.com/medialize/URI.js/releases/tag/v1.19.6 (fix for this particular bypass)\nhttps://github.com/medialize/URI.js/releases/tag/v1.19.4 (fix for related bypass)\nhttps://github.com/medialize/URI.js/releases/tag/v1.19.3 (fix for related bypass)\n[PR #233](https://github.com/medialize/URI.js/pull/233) (initial fix for backslash handling)\n\n### For more information\nIf you have any questions or comments about this advisory, open an issue in https://github.com/medialize/URI.js\n\n### Reporter credit\n[Yaniv Nizry](https://twitter.com/ynizry) from the CxSCA AppSec team at Checkmarx","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","source":"GHSA-p6j9-7xhc-rhwp"}],"affected":[{"ecosystem":"npm","package":"urijs","purl":"pkg:npm/urijs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.19.6"}]}],"fixed":["1.19.6"],"provider":"osv","source":"GHSA-p6j9-7xhc-rhwp","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://github.com/medialize/URI.js/security/advisories/GHSA-p6j9-7xhc-rhwp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27516"},{"type":"WEB","url":"https://github.com/medialize/URI.js/commit/a1ad8bcbc39a4d136d7e252e76e957f3ece70839"},{"type":"WEB","url":"https://advisory.checkmarx.net/advisory/CX-2021-4305"},{"type":"PACKAGE","url":"https://github.com/medialize/URI.js"},{"type":"WEB","url":"https://github.com/medialize/URI.js/releases/tag/v1.19.6"}]},{"provider":"redhat-vex","source_id":"CVE-2021-27516","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2021-27516","license":"CC-BY-4.0","published_at":"2021-02-22T00:00:00Z","modified_at":"2021-10-19T14:08:37Z","summary":"nodejs-urijs: mishandling certain uses of backslash may lead to confidentiality compromise","details":"A flaw was found in nodejs-urijs where URI.js (urijs) mishandles certain uses of the backslash such as http:\\/ and interprets the URI as a relative path. The highest threat from this vulnerability is to confidentiality.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","source":"CVE-2021-27516"},{"type":"Red Hat","score":"Important","source":"CVE-2021-27516"}],"affected":[],"product_status":[{"vendor":"Red Hat","product":"Quay v3","cpe":"cpe:/a:redhat:quay:3::el8","status":"fixed","packages":["quay/quay-rhel8"],"package_count":1,"fixed":[],"advisories":["RHSA-2021:3917"],"provider":"redhat-vex","source":"CVE-2021-27516"},{"vendor":"Red Hat","product":"Quay v3","cpe":"cpe:/a:redhat:quay:3::el8","status":"not_affected","packages":["quay/clair-rhel8","quay/quay-bridge-operator-bundle","quay/quay-bridge-operator-rhel8","quay/quay-builder-qemu-rhcos-rhel8","quay/quay-builder-rhel8","quay/quay-container-security-operator-bundle","quay/quay-container-security-operator-rhel8","quay/quay-operator-bundle","quay/quay-operator-rhel8"],"package_count":9,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-27516"},{"vendor":"Red Hat","product":"Red Hat Advanced Cluster Management for Kubernetes 2","cpe":"cpe:/a:redhat:acm:2","status":"not_affected","packages":["rhacm2/application-ui-rhel8","rhacm2/mcm-topology-rhel8"],"package_count":2,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2021-27516"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-27516.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-27516"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=1934470"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-27516"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27516"}]}],"references":[{"type":"WEB","url":"https://github.com/medialize/URI.js/commit/a1ad8bcbc39a4d136d7e252e76e957f3ece70839"},{"type":"WEB","url":"https://github.com/medialize/URI.js/releases/tag/v1.19.6"},{"type":"WEB","url":"https://advisory.checkmarx.net/advisory/CX-2021-4305"},{"type":"WEB","url":"https://github.com/medialize/URI.js/security/advisories/GHSA-p6j9-7xhc-rhwp"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27516"},{"type":"PACKAGE","url":"https://github.com/medialize/URI.js"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-27516.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2021-27516"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=1934470"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2021-27516"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2021-27516","url":"https://www.cve.org/CVERecord?id=CVE-2021-27516","license":"CC-BY-4.0","modified_at":"2024-08-03T21:26:09.101Z","relation":"self"},{"provider":"nvd","source_id":"CVE-2021-27516","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-27516","relation":"self"},{"provider":"osv","source_id":"GHSA-p6j9-7xhc-rhwp","url":"https://osv.dev/vulnerability/GHSA-p6j9-7xhc-rhwp","license":"CC-BY-4.0","modified_at":"2023-11-08T04:05:24.794143Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2021-27516","url":"https://access.redhat.com/security/cve/CVE-2021-27516","license":"CC-BY-4.0","modified_at":"2021-10-19T14:08:37Z","relation":"self"}]}
