{"id":"CVE-2021-32696","state":"PUBLISHED","title":"Passing in a non-string 'html' argument can lead to unsanitized output","description":"The npm package \"striptags\" is an implementation of PHP's strip_tags in Typescript. In striptags before version 3.2.0, a type-confusion vulnerability can cause `striptags` to concatenate unsanitized strings when an array-like object is passed in as the `html` parameter. This can be abused by an attacker who can control the shape of their input, e.g. if query parameters are passed directly into the function. This can lead to a XSS.","publishedAt":"2021-06-18T19:35:13.000Z","updatedAt":"2024-08-03T23:25:31.066Z","severity":{"score":3.7,"label":"Low","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["ericnorris striptags"],"affected":[{"vendor":"ericnorris","product":"striptags","versions":[{"version":"< 3.2.0","status":"affected"}]}],"references":["https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r","https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca","https://github.com/ericnorris/striptags/releases/tag/v3.2.0","https://www.npmjs.com/package/striptags"],"weaknesses":["CWE-241","CWE-79"],"ingestedAt":"2026-10-29T19:48:33.225Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/32xxx/CVE-2021-32696.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2021-32696","state":"PUBLISHED","datePublished":"2021-06-18T19:35:13.000Z","dateUpdated":"2024-08-03T23:25:31.066Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2021-05-12T00:00:00.000Z"},"containers":{"cna":{"title":"Passing in a non-string 'html' argument can lead to unsanitized output","descriptions":[{"lang":"en","value":"The npm package \"striptags\" is an implementation of PHP's strip_tags in Typescript. In striptags before version 3.2.0, a type-confusion vulnerability can cause `striptags` to concatenate unsanitized strings when an array-like object is passed in as the `html` parameter. This can be abused by an attacker who can control the shape of their input, e.g. if query parameters are passed directly into the function. This can lead to a XSS."}],"affected":[{"vendor":"ericnorris","product":"striptags","versions":[{"version":"< 3.2.0","status":"affected"}]}],"references":[{"url":"https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca","tags":["x_refsource_MISC"]},{"url":"https://github.com/ericnorris/striptags/releases/tag/v3.2.0","tags":["x_refsource_MISC"]},{"url":"https://www.npmjs.com/package/striptags","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":3.7,"baseSeverity":"LOW","confidentialityImpact":"LOW","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-241","description":"CWE-241: Improper Handling of Unexpected Data Type","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-79","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","dateUpdated":"2021-06-18T19:35:12.000Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa"},"source":{"advisory":"GHSA-qxg5-2qff-p49r","discovery":"UNKNOWN"},"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2021-32696","STATE":"PUBLIC","TITLE":"Passing in a non-string 'html' argument can lead to unsanitized output"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"striptags","version":{"version_data":[{"version_value":"< 3.2.0"}]}}]},"vendor_name":"ericnorris"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"The npm package \"striptags\" is an implementation of PHP's strip_tags in Typescript. In striptags before version 3.2.0, a type-confusion vulnerability can cause `striptags` to concatenate unsanitized strings when an array-like object is passed in as the `html` parameter. This can be abused by an attacker who can control the shape of their input, e.g. if query parameters are passed directly into the function. This can lead to a XSS."}]},"impact":{"cvss":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":3.7,"baseSeverity":"LOW","confidentialityImpact":"LOW","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-241: Improper Handling of Unexpected Data Type"}]},{"description":[{"lang":"eng","value":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"}]}]},"references":{"reference_data":[{"name":"https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r","refsource":"CONFIRM","url":"https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r"},{"name":"https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca","refsource":"MISC","url":"https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca"},{"name":"https://github.com/ericnorris/striptags/releases/tag/v3.2.0","refsource":"MISC","url":"https://github.com/ericnorris/striptags/releases/tag/v3.2.0"},{"name":"https://www.npmjs.com/package/striptags","refsource":"MISC","url":"https://www.npmjs.com/package/striptags"}]},"source":{"advisory":"GHSA-qxg5-2qff-p49r","discovery":"UNKNOWN"}}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/ericnorris/striptags/security/advisories/GHSA-qxg5-2qff-p49r","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/ericnorris/striptags/commit/f252a6b0819499cd65403707ebaf5cc925f2faca","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/ericnorris/striptags/releases/tag/v3.2.0","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://www.npmjs.com/package/striptags","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T23:25:31.066Z"}}]}}}