mirror of
https://github.com/hanzoai/deploy.git
synced 2026-10-07 08:44:50 +00:00
Every command is cd-*: cd, cd-server, cd-repo-server, cd-application-controller, cd-applicationset-controller, cd-cmp-server, cd-commit-server, cd-dex, cd-git-ask-pass, cd-k8s-auth, cd-notification. util/argo is util/cd; util/notification/argocd is util/notification/cd. Preserved deliberately: github.com/argoproj/argocd-example-apps is an EXTERNAL repo used as an e2e fixture, and notifications-engine + pkg/v2 are real dependencies. Renaming a URL we do not own would break the tests. Two bugs I made and caught, both from a careless sed: - s/argo/cd/g turned 'argocd' into 'cdcd' in two directory names - renaming the package declaration left every call site saying argo.X go build ./... exit 0. Co-authored-by: Hanzo Dev <[email protected]>
2284 lines
112 KiB
HTML
2284 lines
112 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
|
||
<head>
|
||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||
<meta http-equiv="Content-Language" content="en-us">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<title>Snyk test report</title>
|
||
<meta name="description" content="16 known vulnerabilities found in 21 vulnerable dependency paths.">
|
||
<base target="_blank">
|
||
<link rel="icon" type="image/png" href="https://res.cloudinary.com/snyk/image/upload/v1468845142/favicon/favicon.png"
|
||
sizes="194x194">
|
||
<link rel="shortcut icon" href="https://res.cloudinary.com/snyk/image/upload/v1468845142/favicon/favicon.ico">
|
||
<style type="text/css">
|
||
|
||
body {
|
||
-moz-font-feature-settings: "pnum";
|
||
-webkit-font-feature-settings: "pnum";
|
||
font-variant-numeric: proportional-nums;
|
||
display: flex;
|
||
flex-direction: column;
|
||
font-feature-settings: "pnum";
|
||
font-size: 100%;
|
||
line-height: 1.5;
|
||
min-height: 100vh;
|
||
-webkit-text-size-adjust: 100%;
|
||
margin: 0;
|
||
padding: 0;
|
||
background-color: #F5F5F5;
|
||
font-family: 'Arial', 'Helvetica', Calibri, sans-serif;
|
||
}
|
||
|
||
h1,
|
||
h2,
|
||
h3,
|
||
h4,
|
||
h5,
|
||
h6 {
|
||
font-weight: 500;
|
||
}
|
||
|
||
a,
|
||
a:link,
|
||
a:visited {
|
||
border-bottom: 1px solid #4b45a9;
|
||
text-decoration: none;
|
||
color: #4b45a9;
|
||
}
|
||
|
||
a:hover,
|
||
a:focus,
|
||
a:active {
|
||
border-bottom: 1px solid #4b45a9;
|
||
}
|
||
|
||
hr {
|
||
border: none;
|
||
margin: 1em 0;
|
||
border-top: 1px solid #c5c5c5;
|
||
}
|
||
|
||
ul {
|
||
padding: 0 1em;
|
||
margin: 1em 0;
|
||
}
|
||
|
||
code {
|
||
background-color: #EEE;
|
||
color: #333;
|
||
padding: 0.25em 0.5em;
|
||
border-radius: 0.25em;
|
||
}
|
||
|
||
pre {
|
||
background-color: #333;
|
||
font-family: monospace;
|
||
padding: 0.5em 1em 0.75em;
|
||
border-radius: 0.25em;
|
||
font-size: 14px;
|
||
}
|
||
|
||
pre code {
|
||
padding: 0;
|
||
background-color: transparent;
|
||
color: #fff;
|
||
}
|
||
|
||
a code {
|
||
border-radius: .125rem .125rem 0 0;
|
||
padding-bottom: 0;
|
||
color: #4b45a9;
|
||
}
|
||
|
||
a[href^="http://"]:after,
|
||
a[href^="https://"]:after {
|
||
background-image: linear-gradient(transparent,transparent),url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20112%20109%22%3E%3Cg%20id%3D%22Page-1%22%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Cg%20id%3D%22link-external%22%3E%3Cg%20id%3D%22arrow%22%3E%3Cpath%20id%3D%22Line%22%20stroke%3D%22%234B45A9%22%20stroke-width%3D%2215%22%20d%3D%22M88.5%2021l-43%2042.5%22%20stroke-linecap%3D%22square%22%2F%3E%3Cpath%20id%3D%22Triangle%22%20fill%3D%22%234B45A9%22%20d%3D%22M111.2%200v50L61%200z%22%2F%3E%3C%2Fg%3E%3Cpath%20id%3D%22square%22%20fill%3D%22%234B45A9%22%20d%3D%22M66%2015H0v94h94V44L79%2059v35H15V30h36z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
|
||
background-repeat: no-repeat;
|
||
background-size: .75rem;
|
||
content: "";
|
||
display: inline-block;
|
||
height: .75rem;
|
||
margin-left: .25rem;
|
||
width: .75rem;
|
||
}
|
||
|
||
|
||
/* Layout */
|
||
|
||
[class*=layout-container] {
|
||
margin: 0 auto;
|
||
max-width: 71.25em;
|
||
padding: 1.9em 1.3em;
|
||
position: relative;
|
||
}
|
||
.layout-container--short {
|
||
padding-top: 0;
|
||
padding-bottom: 0;
|
||
max-width: 48.75em;
|
||
}
|
||
|
||
.layout-container--short:after {
|
||
display: block;
|
||
content: "";
|
||
clear: both;
|
||
}
|
||
|
||
/* Header */
|
||
|
||
.header {
|
||
padding-bottom: 1px;
|
||
}
|
||
|
||
.paths {
|
||
margin-left: 8px;
|
||
}
|
||
.header-wrap {
|
||
display: flex;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
padding-top: 2em;
|
||
}
|
||
.project__header {
|
||
background-color: #030328;
|
||
color: #fff;
|
||
margin-bottom: -1px;
|
||
padding-top: 1em;
|
||
padding-bottom: 0.25em;
|
||
border-bottom: 2px solid #BBB;
|
||
}
|
||
|
||
.project__header__title {
|
||
overflow-wrap: break-word;
|
||
word-wrap: break-word;
|
||
word-break: break-all;
|
||
margin-bottom: .1em;
|
||
margin-top: 0;
|
||
}
|
||
|
||
.timestamp {
|
||
float: right;
|
||
clear: none;
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
.meta-counts {
|
||
clear: both;
|
||
display: block;
|
||
flex-wrap: wrap;
|
||
justify-content: space-between;
|
||
margin: 0 0 1.5em;
|
||
color: #fff;
|
||
clear: both;
|
||
font-size: 1.1em;
|
||
}
|
||
|
||
.meta-count {
|
||
display: block;
|
||
flex-basis: 100%;
|
||
margin: 0 1em 1em 0;
|
||
float: left;
|
||
padding-right: 1em;
|
||
border-right: 2px solid #fff;
|
||
}
|
||
|
||
.meta-count:last-child {
|
||
border-right: 0;
|
||
padding-right: 0;
|
||
margin-right: 0;
|
||
}
|
||
|
||
/* Card */
|
||
|
||
.card {
|
||
background-color: #fff;
|
||
border: 1px solid #c5c5c5;
|
||
border-radius: .25rem;
|
||
margin: 0 0 2em 0;
|
||
position: relative;
|
||
min-height: 40px;
|
||
padding: 1.5em;
|
||
}
|
||
|
||
.card__labels {
|
||
position: absolute;
|
||
top: 1.1em;
|
||
left: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.card .label {
|
||
background-color: #767676;
|
||
border: 2px solid #767676;
|
||
color: white;
|
||
padding: 0.25rem 0.75rem;
|
||
font-size: 0.875rem;
|
||
text-transform: uppercase;
|
||
display: inline-block;
|
||
margin: 0;
|
||
border-radius: 0.25rem;
|
||
}
|
||
|
||
.card .label__text {
|
||
vertical-align: text-top;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.card .label--critical {
|
||
background-color: #AB1A1A;
|
||
border-color: #AB1A1A;
|
||
}
|
||
|
||
.card .label--high {
|
||
background-color: #CE5019;
|
||
border-color: #CE5019;
|
||
}
|
||
|
||
.card .label--medium {
|
||
background-color: #D68000;
|
||
border-color: #D68000;
|
||
}
|
||
|
||
.card .label--low {
|
||
background-color: #88879E;
|
||
border-color: #88879E;
|
||
}
|
||
|
||
.card .label--exploit {
|
||
background-color: #8B5A96;
|
||
border-color: #8B5A96;
|
||
}
|
||
|
||
.severity--low {
|
||
border-color: #88879E;
|
||
}
|
||
|
||
.severity--medium {
|
||
border-color: #D68000;
|
||
}
|
||
|
||
.severity--high {
|
||
border-color: #CE5019;
|
||
}
|
||
|
||
.severity--critical {
|
||
border-color: #AB1A1A;
|
||
}
|
||
|
||
.card--vuln {
|
||
padding-top: 4em;
|
||
}
|
||
|
||
.card--vuln .card__labels > .label:first-child {
|
||
padding-left: 1.9em;
|
||
padding-right: 1.9em;
|
||
border-radius: 0 0.25rem 0.25rem 0;
|
||
}
|
||
|
||
.card--vuln .card__section h2 {
|
||
font-size: 22px;
|
||
margin-bottom: 0.5em;
|
||
}
|
||
|
||
.card--vuln .card__section p {
|
||
margin: 0 0 0.5em 0;
|
||
}
|
||
|
||
.card--vuln .card__meta {
|
||
padding: 0 0 0 1em;
|
||
margin: 0;
|
||
font-size: 1.1em;
|
||
}
|
||
|
||
.card .card__meta__paths {
|
||
font-size: 0.9em;
|
||
}
|
||
|
||
.card--vuln .card__title {
|
||
font-size: 28px;
|
||
margin-top: 0;
|
||
margin-right: 100px; /* Ensure space for the risk score */
|
||
}
|
||
|
||
.card--vuln .card__cta p {
|
||
margin: 0;
|
||
text-align: right;
|
||
}
|
||
|
||
.risk-score-display {
|
||
position: absolute;
|
||
top: 1.5em;
|
||
right: 1.5em;
|
||
text-align: right;
|
||
z-index: 10;
|
||
}
|
||
|
||
.risk-score-display__label {
|
||
font-size: 0.7em;
|
||
font-weight: bold;
|
||
color: #586069;
|
||
text-transform: uppercase;
|
||
line-height: 1;
|
||
margin-bottom: 3px;
|
||
}
|
||
|
||
.risk-score-display__value {
|
||
font-size: 1.9em;
|
||
font-weight: 600;
|
||
color: #24292e;
|
||
line-height: 1;
|
||
}
|
||
|
||
.source-panel {
|
||
clear: both;
|
||
display: flex;
|
||
justify-content: flex-start;
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
padding: 0.5em 0;
|
||
width: fit-content;
|
||
}
|
||
|
||
|
||
|
||
</style>
|
||
<style type="text/css">
|
||
.metatable {
|
||
text-size-adjust: 100%;
|
||
-webkit-font-smoothing: antialiased;
|
||
-webkit-box-direction: normal;
|
||
color: inherit;
|
||
font-feature-settings: "pnum";
|
||
box-sizing: border-box;
|
||
background: transparent;
|
||
border: 0;
|
||
font: inherit;
|
||
font-size: 100%;
|
||
margin: 0;
|
||
outline: none;
|
||
padding: 0;
|
||
text-align: left;
|
||
text-decoration: none;
|
||
vertical-align: baseline;
|
||
z-index: auto;
|
||
margin-top: 12px;
|
||
border-collapse: collapse;
|
||
border-spacing: 0;
|
||
font-variant-numeric: tabular-nums;
|
||
max-width: 51.75em;
|
||
}
|
||
|
||
tbody {
|
||
text-size-adjust: 100%;
|
||
-webkit-font-smoothing: antialiased;
|
||
-webkit-box-direction: normal;
|
||
color: inherit;
|
||
font-feature-settings: "pnum";
|
||
border-collapse: collapse;
|
||
border-spacing: 0;
|
||
box-sizing: border-box;
|
||
background: transparent;
|
||
border: 0;
|
||
font: inherit;
|
||
font-size: 100%;
|
||
margin: 0;
|
||
outline: none;
|
||
padding: 0;
|
||
text-align: left;
|
||
text-decoration: none;
|
||
vertical-align: baseline;
|
||
z-index: auto;
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.meta-row {
|
||
text-size-adjust: 100%;
|
||
-webkit-font-smoothing: antialiased;
|
||
-webkit-box-direction: normal;
|
||
color: inherit;
|
||
font-feature-settings: "pnum";
|
||
border-collapse: collapse;
|
||
border-spacing: 0;
|
||
box-sizing: border-box;
|
||
background: transparent;
|
||
border: 0;
|
||
font: inherit;
|
||
font-size: 100%;
|
||
outline: none;
|
||
text-align: left;
|
||
text-decoration: none;
|
||
vertical-align: baseline;
|
||
z-index: auto;
|
||
display: flex;
|
||
align-items: start;
|
||
border-top: 1px solid #d3d3d9;
|
||
padding: 8px 0 0 0;
|
||
border-bottom: none;
|
||
margin: 8px;
|
||
width: 47.75%;
|
||
}
|
||
|
||
.meta-row-label {
|
||
text-size-adjust: 100%;
|
||
-webkit-font-smoothing: antialiased;
|
||
-webkit-box-direction: normal;
|
||
font-feature-settings: "pnum";
|
||
border-collapse: collapse;
|
||
border-spacing: 0;
|
||
color: #4c4a73;
|
||
box-sizing: border-box;
|
||
background: transparent;
|
||
border: 0;
|
||
font: inherit;
|
||
margin: 0;
|
||
outline: none;
|
||
text-decoration: none;
|
||
z-index: auto;
|
||
align-self: start;
|
||
flex: 1;
|
||
font-size: 1rem;
|
||
line-height: 1.5rem;
|
||
padding: 0;
|
||
text-align: left;
|
||
vertical-align: top;
|
||
text-transform: none;
|
||
letter-spacing: 0;
|
||
}
|
||
|
||
.meta-row-value {
|
||
text-size-adjust: 100%;
|
||
-webkit-font-smoothing: antialiased;
|
||
-webkit-box-direction: normal;
|
||
color: inherit;
|
||
font-feature-settings: "pnum";
|
||
border-collapse: collapse;
|
||
border-spacing: 0;
|
||
word-break: break-word;
|
||
box-sizing: border-box;
|
||
background: transparent;
|
||
border: 0;
|
||
font: inherit;
|
||
font-size: 100%;
|
||
margin: 0;
|
||
outline: none;
|
||
padding: 0;
|
||
text-align: right;
|
||
text-decoration: none;
|
||
vertical-align: baseline;
|
||
z-index: auto;
|
||
}
|
||
</style>
|
||
</head>
|
||
|
||
<body class="section-projects">
|
||
<main class="layout-stacked">
|
||
<div class="layout-stacked__header header">
|
||
<header class="project__header">
|
||
<div class="layout-container">
|
||
<a class="brand" href="https://snyk.io" title="Snyk">
|
||
<svg width="68px" height="35px" viewBox="0 0 68 35" version="1.1" xmlns="http://www.w3.org/2000/svg" role="img">
|
||
<title>Snyk - Open Source Security</title>
|
||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||
<g fill="#fff">
|
||
<path d="M5.732,27.278 C3.445,27.278 1.589,26.885 0,26.124 L0.483,22.472 C2.163,23.296 4.056,23.689 5.643,23.689 C6.801,23.689 7.563,23.295 7.563,22.599 C7.563,20.594 0.333,21.076 0.333,15.839 C0.333,12.491 3.407,10.729 7.259,10.729 C9.179,10.729 11.161,11.249 12.444,11.704 L11.924,15.294 C10.577,14.774 8.747,14.291 7.222,14.291 C6.282,14.291 5.518,14.621 5.518,15.231 C5.518,17.208 12.903,16.815 12.903,21.925 C12.903,25.325 9.877,27.277 5.733,27.277 L5.732,27.278 Z M25.726,26.936 L25.726,17.894 C25.726,15.827 24.811,14.85 23.069,14.85 C22.219,14.85 21.329,15.09 20.719,15.46 L20.719,26.936 L15.352,26.936 L15.352,11.262 L20.602,10.83 L20.474,13.392 L20.652,13.392 C21.784,11.87 23.702,10.716 25.992,10.716 C28.736,10.716 31.112,12.416 31.112,16.436 L31.112,26.936 L25.724,26.936 L25.726,26.936 Z M61.175,26.936 L56.879,19.479 L56.446,19.479 L56.446,26.935 L51.082,26.935 L51.082,8.37 L56.447,0 L56.447,17.323 C57.515,16.017 61.112,11.059 61.112,11.059 L67.732,11.059 L61.454,17.689 L67.949,26.95 L61.175,26.95 L61.175,26.938 L61.175,26.936 Z M44.13,11.11 L41.93,18.262 C41.5,19.606 41.08,22.079 41.08,22.079 C41.08,22.079 40.75,19.516 40.292,18.172 L37.94,11.108 L31.928,11.108 L38.462,26.935 C37.572,29.04 36.199,30.815 34.369,30.815 C34.039,30.815 33.709,30.802 33.389,30.765 L31.255,34.061 C31.928,34.441 33.212,34.835 34.737,34.835 C38.703,34.835 41.359,31.627 43.215,26.885 L49.443,11.108 L44.132,11.108 L44.13,11.11 Z"></path>
|
||
</g>
|
||
</g>
|
||
</svg>
|
||
</a>
|
||
<div class="header-wrap">
|
||
<h1 class="project__header__title">Snyk test report</h1>
|
||
|
||
<p class="timestamp">July 5th 2026, 12:43:17 am (UTC+00:00)</p>
|
||
</div>
|
||
<div class="source-panel">
|
||
<span>Scanned the following paths:</span>
|
||
<ul>
|
||
<li class="paths">/argo-cd/argoproj/argo-cd/v3/go.mod (gomodules)</li>
|
||
<li class="paths">/argo-cd/argoproj/argo-cd/gitops-engine/gitops-engine/go.mod (gomodules)</li>
|
||
<li class="paths">/argo-cd/argoproj/argo-cd/get-previous-release/hack/get-previous-release/go.mod (gomodules)</li>
|
||
<li class="paths">/argo-cd/ui/pnpm-lock.yaml (pnpm)</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="meta-counts">
|
||
<div class="meta-count"><span>16</span> <span>known vulnerabilities</span></div>
|
||
<div class="meta-count"><span>21 vulnerable dependency paths</span></div>
|
||
<div class="meta-count"><span>3099</span> <span>dependencies</span></div>
|
||
</div><!-- .meta-counts -->
|
||
</div><!-- .layout-container--short -->
|
||
</header><!-- .project__header -->
|
||
</div><!-- .layout-stacked__header -->
|
||
|
||
<div class="layout-container" style="padding-top: 35px;">
|
||
<div class="cards--vuln filter--patch filter--ignore">
|
||
<div class="card card--vuln disclosure--not-new severity--critical" data-snyk-test="critical">
|
||
<h2 class="card__title">Resources Downloaded over Insecure Protocol</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--critical">
|
||
<span class="label__text">critical severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Not Defined</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
esbuild
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://www.npmjs.org/package/esbuild">esbuild</a> is an An extremely fast JavaScript and CSS bundler and minifier.</p>
|
||
<p>Affected versions of this package are vulnerable to Resources Downloaded over Insecure Protocol in the <code>installFromNPM</code> process. An attacker can execute arbitrary code with the privileges of the Deno process by supplying a malicious binary through control of the <code>NPM_CONFIG_REGISTRY</code> environment variable.</p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>esbuild</code> to version 0.28.1 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/evanw/esbuild/security/advisories/GHSA-gv7w-rqvm-qjhr">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/evanw/esbuild/commit/9ff053e53b8eeb990f59355dbea365277ac45ee2">GitHub Commit</a></li>
|
||
<li><a href="https://github.com/evanw/esbuild/releases/tag/v0.28.1">GitHub Release</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-ESBUILD-17750822">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--high" data-snyk-test="high">
|
||
<h2 class="card__title">Regular Expression Denial of Service (ReDoS)</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--high">
|
||
<span class="label__text">high severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Not Defined</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
linkify-it
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://www.npmjs.org/package/linkify-it">linkify-it</a> is a Links recognition library with FULL unicode support</p>
|
||
<p>Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) due to quadratic algorithmic complexity in the <code>match</code> function. An attacker can exhaust CPU resources and cause significant delays in processing by submitting specially crafted input containing a large number of email-like or link-like strings.</p>
|
||
<h2 id="details">Details</h2>
|
||
<p>Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.</p>
|
||
<p>The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.</p>
|
||
<p>Let’s take the following regular expression as an example:</p>
|
||
<pre><code class="language-js">regex = /A(B|C+)+D/
|
||
</code></pre>
|
||
<p>This regular expression accomplishes the following:</p>
|
||
<ul>
|
||
<li><code>A</code> The string must start with the letter 'A'</li>
|
||
<li><code>(B|C+)+</code> The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the <code>+</code> matches one or more times). The <code>+</code> at the end of this section states that we can look for one or more matches of this section.</li>
|
||
<li><code>D</code> Finally, we ensure this section of the string ends with a 'D'</li>
|
||
</ul>
|
||
<p>The expression would match inputs such as <code>ABBD</code>, <code>ABCCCCD</code>, <code>ABCBCCCD</code> and <code>ACCCCCD</code></p>
|
||
<p>It most cases, it doesn't take very long for a regex engine to find a match:</p>
|
||
<pre><code class="language-bash">$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
|
||
0.04s user 0.01s system 95% cpu 0.052 total
|
||
|
||
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
|
||
1.79s user 0.02s system 99% cpu 1.812 total
|
||
</code></pre>
|
||
<p>The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.</p>
|
||
<p>Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as <em>catastrophic backtracking</em>.</p>
|
||
<p>Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:</p>
|
||
<ol>
|
||
<li>CCC</li>
|
||
<li>CC+C</li>
|
||
<li>C+CC</li>
|
||
<li>C+C+C.</li>
|
||
</ol>
|
||
<p>The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use <a href="https://regex101.com/debugger">RegEx 101 debugger</a> to see the engine has to take a total of 38 steps before it can determine the string doesn't match.</p>
|
||
<p>From there, the number of steps the engine must use to validate a string just continues to grow.</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>String</th>
|
||
<th align="right">Number of C's</th>
|
||
<th align="right">Number of steps</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr>
|
||
<td>ACCCX</td>
|
||
<td align="right">3</td>
|
||
<td align="right">38</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ACCCCX</td>
|
||
<td align="right">4</td>
|
||
<td align="right">71</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ACCCCCX</td>
|
||
<td align="right">5</td>
|
||
<td align="right">136</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ACCCCCCCCCCCCCCX</td>
|
||
<td align="right">14</td>
|
||
<td align="right">65,553</td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p>By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.</p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>linkify-it</code> to version 5.0.1 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/markdown-it/linkify-it/security/advisories/GHSA-22p9-wv53-3rq4">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/markdown-it/linkify-it/commit/6be6d15e0641bf1daeaa977d500cabc743166159">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-LINKIFYIT-17817062">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--high" data-snyk-test="high">
|
||
<h2 class="card__title">Inefficient Algorithmic Complexity</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--high">
|
||
<span class="label__text">high severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Not Defined</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
brace-expansion
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
@redocly/[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/juliangruber/brace-expansion">brace-expansion</a> is a Brace expansion as known from sh/bash</p>
|
||
<p>Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via the <code>expand</code> function. An attacker can cause excessive CPU consumption and block the event loop by supplying a specially crafted string containing multiple consecutive non-expanding '{}' brace groups. The <code>max</code> option does not prevent this issue, as it only limits the output size and not the computational workload.</p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>brace-expansion</code> to version 5.0.7 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/juliangruber/brace-expansion/commit/c7e33ec13ac1a684c116720843ce24e208611754">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-17706650">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Improper Validation of Specified Index, Position, or Offset in Input</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
uuid
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/kelektiv/node-uuid">uuid</a> is a RFC4122 (v1, v4, and v5) compliant UUID library.</p>
|
||
<p>Affected versions of this package are vulnerable to Improper Validation of Specified Index, Position, or Offset in Input due to accepting external output buffers but not rejecting out-of-range writes (small <code>buf</code> or large <code>offset</code>). This inconsistency allows silent partial writes into caller-provided buffers.</p>
|
||
<h2 id="poc">PoC</h2>
|
||
<pre><code>cd /home/StrawHat/uuid
|
||
npm ci
|
||
npm run build
|
||
|
||
node --input-type=module -e "
|
||
import {v4,v5,v6} from './dist-node/index.js';
|
||
const ns='6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
||
for (const [name,fn] of [
|
||
['v4',()=>v4({},new Uint8Array(8),4)],
|
||
['v5',()=>v5('x',ns,new Uint8Array(8),4)],
|
||
['v6',()=>v6({},new Uint8Array(8),4)],
|
||
]) {
|
||
try { fn(); console.log(name,'NO_THROW'); }
|
||
catch(e){ console.log(name,'THREW',e.name); }
|
||
}"
|
||
</code></pre>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>uuid</code> to version 11.1.1, 14.0.0 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/uuidjs/uuid/commit/32389c887c9e75f90442ee4cc95bbab0c4e8346e">GitHub Commit</a></li>
|
||
<li><a href="https://github.com/uuidjs/uuid/commit/3d2c5b0342f0fcb52a5ac681c3d47c13e7444b34">GitHub Commit</a></li>
|
||
<li><a href="https://github.com/uuidjs/uuid/releases/tag/v14.0.0">GitHub Release</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-UUID-16133035">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Inefficient Algorithmic Complexity</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
js-yaml
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
@redocly/[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://www.npmjs.com/package/js-yaml">js-yaml</a> is a human-friendly data serialization language.</p>
|
||
<p>Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in the <code>storeMappingPair()</code> function in <code>loader.js</code> when handling repeated aliases in merge sequences. An attacker can exhaust CPU resources and significantly degrade service availability by submitting malicious YAML documents.</p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>js-yaml</code> to version 4.2.0 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/nodeca/js-yaml/security/advisories/GHSA-h67p-54hq-rp68">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/nodeca/js-yaml/commit/be24136de7921fc4b3e0b3072d6e2d9c58404ca2">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-JSYAML-17342520">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Improper Validation of Specified Type of Input</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Not Defined</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd/argoproj/argo-cd/v3 <span class="list-paths__item__arrow">›</span> go.mod
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: golang
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
github.com/vmihailenco/msgpack/v5
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
github.com/argoproj/argo-cd/[email protected], github.com/go-redis/cache/[email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
github.com/argoproj/argo-cd/[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
github.com/go-redis/cache/[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
github.com/vmihailenco/msgpack/[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
github.com/argoproj/argo-cd/[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
github.com/r3labs/diff/[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
github.com/vmihailenco/msgpack/[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p>Affected versions of this package are vulnerable to Improper Validation of Specified Type of Input in the calls plugin when handling websocket messages containing malformed msgpack frames. An attacker can cause the server to consume excessive memory and crash by sending specially crafted websocket requests.</p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>There is no fixed version for <code>github.com/vmihailenco/msgpack/v5</code>.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/mattermost/msgpack/commit/2f9c67d7e57f">GitHub Commit</a></li>
|
||
<li><a href="https://mattermost.com/security-updates">Mattermost Security Updates</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMVMIHAILENCOMSGPACKV5-15702238">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Regular Expression Denial of Service (ReDoS)</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
foundation-sites
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
[email protected] and [email protected]
|
||
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/zurb/foundation-sites">foundation-sites</a> is a responsive front-end framework</p>
|
||
<p>Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) due to inefficient backtracking in the regular expressions used in URL forms.</p>
|
||
<h2 id="poc">PoC</h2>
|
||
<pre><code>https://www.''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
|
||
</code></pre>
|
||
<h2 id="details">Details</h2>
|
||
<p>Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.</p>
|
||
<p>The Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.</p>
|
||
<p>Let’s take the following regular expression as an example:</p>
|
||
<pre><code class="language-js">regex = /A(B|C+)+D/
|
||
</code></pre>
|
||
<p>This regular expression accomplishes the following:</p>
|
||
<ul>
|
||
<li><code>A</code> The string must start with the letter 'A'</li>
|
||
<li><code>(B|C+)+</code> The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the <code>+</code> matches one or more times). The <code>+</code> at the end of this section states that we can look for one or more matches of this section.</li>
|
||
<li><code>D</code> Finally, we ensure this section of the string ends with a 'D'</li>
|
||
</ul>
|
||
<p>The expression would match inputs such as <code>ABBD</code>, <code>ABCCCCD</code>, <code>ABCBCCCD</code> and <code>ACCCCCD</code></p>
|
||
<p>It most cases, it doesn't take very long for a regex engine to find a match:</p>
|
||
<pre><code class="language-bash">$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD")'
|
||
0.04s user 0.01s system 95% cpu 0.052 total
|
||
|
||
$ time node -e '/A(B|C+)+D/.test("ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX")'
|
||
1.79s user 0.02s system 99% cpu 1.812 total
|
||
</code></pre>
|
||
<p>The entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.</p>
|
||
<p>Most Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as <em>catastrophic backtracking</em>.</p>
|
||
<p>Let's look at how our expression runs into this problem, using a shorter string: "ACCCX". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:</p>
|
||
<ol>
|
||
<li>CCC</li>
|
||
<li>CC+C</li>
|
||
<li>C+CC</li>
|
||
<li>C+C+C.</li>
|
||
</ol>
|
||
<p>The engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use <a href="https://regex101.com/debugger">RegEx 101 debugger</a> to see the engine has to take a total of 38 steps before it can determine the string doesn't match.</p>
|
||
<p>From there, the number of steps the engine must use to validate a string just continues to grow.</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>String</th>
|
||
<th align="right">Number of C's</th>
|
||
<th align="right">Number of steps</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr>
|
||
<td>ACCCX</td>
|
||
<td align="right">3</td>
|
||
<td align="right">38</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ACCCCX</td>
|
||
<td align="right">4</td>
|
||
<td align="right">71</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ACCCCCX</td>
|
||
<td align="right">5</td>
|
||
<td align="right">136</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ACCCCCCCCCCCCCCX</td>
|
||
<td align="right">14</td>
|
||
<td align="right">65,553</td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p>By the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.</p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>There is no fixed version for <code>foundation-sites</code>.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://securitylab.github.com/advisories/GHSL-2020-290-redos-foundation-sites">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/foundation/foundation-sites/issues/12180">GitHub Issue</a></li>
|
||
<li><a href="https://github.com/foundation/foundation-sites/blob/develop/js/foundation.abide.js#L864">Vulnerable Code</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-FOUNDATIONSITES-8310364">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">CRLF Injection</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
form-data
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], @types/[email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
@types/[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p>Affected versions of this package are vulnerable to CRLF Injection via the <code>_multiPartHeader</code> function when untrusted input is provided via <code>field</code> or <code>filename</code> to <code>FormData#append</code>. An attacker can inject additional headers or multipart parts by including carriage returns, line feeds, or double quotes in the input. This can allow the modification or addition of form fields visible to downstream parsers.</p>
|
||
<h2 id="poc">PoC</h2>
|
||
<pre><code class="language-js">const FormData = require('form-data');
|
||
const form = new FormData();
|
||
form.append('email"\r\nX-Injected: true\r\nfake="', '[email protected]');
|
||
console.log(form.getBuffer().toString());
|
||
</code></pre>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>form-data</code> to version 2.5.6, 3.0.5, 4.0.6 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/form-data/form-data/commit/8777e67fbd0282d3dcba81f974fbdd91062c5b23">GitHub Commit</a></li>
|
||
<li><a href="https://github.com/form-data/form-data/commit/8dff42c6da654ed4e7ad4acb7f8ccd3831217c99">GitHub Commit</a></li>
|
||
<li><a href="https://github.com/form-data/form-data/commit/b62031603c2d7c329b2a369b49466790f0ba6314">GitHub Commit</a></li>
|
||
<li><a href="https://github.com/form-data/form-data/security/advisories/GHSA-hmw2-7cc7-3qxx">Maintainer's Advisory</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-FORMDATA-17337015">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Cross-site Scripting (XSS)</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
dompurify
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/cure53/DOMPurify">dompurify</a> is a DOM-only XSS sanitizer for HTML, MathML and SVG.</p>
|
||
<p>Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the <code>IN_PLACE</code> process when attacker-controlled live DOM nodes are sanitized. An attacker can execute arbitrary scripts in the context of the application by passing a manipulated DOM node with a spoofed <code>nodeName</code> property, causing malicious script elements to be retained and executed upon insertion into the document.</p>
|
||
<h2 id="poc">PoC</h2>
|
||
<pre><code class="language-js"><!doctype html>
|
||
<html><body>
|
||
<script src="dist/purify.js"></script>
|
||
<script>
|
||
const foreign = window.open('about:blank', '_blank', 'noopener=no');
|
||
|
||
const host = foreign.document.createElement('div');
|
||
const script = foreign.document.createElement('script');
|
||
script.textContent = 'window.__pwned = 1';
|
||
Object.defineProperty(script, 'nodeName', {
|
||
value: 'DIV',
|
||
configurable: true,
|
||
});
|
||
host.appendChild(script);
|
||
|
||
DOMPurify.sanitize(host, { IN_PLACE: true });
|
||
|
||
console.log('output:', host.outerHTML);
|
||
// <div><script>window.__pwned = 1</script></div>
|
||
|
||
window.__pwned = 0;
|
||
document.body.appendChild(host);
|
||
console.log('handler fired:', window.__pwned === 1); // true
|
||
</script>
|
||
</body></html>
|
||
</code></pre>
|
||
<h2 id="details">Details</h2>
|
||
<p>Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.</p>
|
||
<p>This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.</p>
|
||
<p>Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.</p>
|
||
<p>Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <code><</code> can be coded as <code>&lt</code>; and <code>></code> can be coded as <code>&gt</code>; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <code><</code> and <code>></code> as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.</p>
|
||
<p>The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware. </p>
|
||
<h3 id="types-of-attacks">Types of attacks</h3>
|
||
<p>There are a few methods by which XSS can be manipulated:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Type</th>
|
||
<th>Origin</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr>
|
||
<td><strong>Stored</strong></td>
|
||
<td>Server</td>
|
||
<td>The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Reflected</strong></td>
|
||
<td>Server</td>
|
||
<td>The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>DOM-based</strong></td>
|
||
<td>Client</td>
|
||
<td>The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Mutated</strong></td>
|
||
<td></td>
|
||
<td>The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.</td>
|
||
</tr>
|
||
</tbody></table>
|
||
<h3 id="affected-environments">Affected environments</h3>
|
||
<p>The following environments are susceptible to an XSS attack:</p>
|
||
<ul>
|
||
<li>Web servers</li>
|
||
<li>Application servers</li>
|
||
<li>Web application environments</li>
|
||
</ul>
|
||
<h3 id="how-to-prevent">How to prevent</h3>
|
||
<p>This section describes the top best practices designed to specifically protect your code: </p>
|
||
<ul>
|
||
<li>Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches. </li>
|
||
<li>Convert special characters such as <code>?</code>, <code>&</code>, <code>/</code>, <code><</code>, <code>></code> and spaces to their respective HTML or URL encoded equivalents. </li>
|
||
<li>Give users the option to disable client-side scripts.</li>
|
||
<li>Redirect invalid requests.</li>
|
||
<li>Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.</li>
|
||
<li>Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.</li>
|
||
<li>Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.</li>
|
||
</ul>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>dompurify</code> to version 3.4.8 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/cure53/DOMPurify/security/advisories/GHSA-x4vx-rjvf-j5p4">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/cure53/DOMPurify/commit/bcdd8285412dc9c4c149652aed2d712e790d6ccf">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-DOMPURIFY-17342528">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Cross-site Scripting (XSS)</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
dompurify
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/cure53/DOMPurify">dompurify</a> is a DOM-only XSS sanitizer for HTML, MathML and SVG.</p>
|
||
<p>Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the <code>IN_PLACE</code> function when handling a <code><template></code> element containing an element with an attached shadow DOM. An attacker can execute arbitrary scripts in the context of the user by injecting malicious content into the shadow DOM, which is not sanitized and is later executed when the template is cloned and inserted into the page.</p>
|
||
<h2 id="details">Details</h2>
|
||
<p>Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.</p>
|
||
<p>This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.</p>
|
||
<p>Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.</p>
|
||
<p>Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <code><</code> can be coded as <code>&lt</code>; and <code>></code> can be coded as <code>&gt</code>; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <code><</code> and <code>></code> as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.</p>
|
||
<p>The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware. </p>
|
||
<h3 id="types-of-attacks">Types of attacks</h3>
|
||
<p>There are a few methods by which XSS can be manipulated:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Type</th>
|
||
<th>Origin</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr>
|
||
<td><strong>Stored</strong></td>
|
||
<td>Server</td>
|
||
<td>The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Reflected</strong></td>
|
||
<td>Server</td>
|
||
<td>The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>DOM-based</strong></td>
|
||
<td>Client</td>
|
||
<td>The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Mutated</strong></td>
|
||
<td></td>
|
||
<td>The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.</td>
|
||
</tr>
|
||
</tbody></table>
|
||
<h3 id="affected-environments">Affected environments</h3>
|
||
<p>The following environments are susceptible to an XSS attack:</p>
|
||
<ul>
|
||
<li>Web servers</li>
|
||
<li>Application servers</li>
|
||
<li>Web application environments</li>
|
||
</ul>
|
||
<h3 id="how-to-prevent">How to prevent</h3>
|
||
<p>This section describes the top best practices designed to specifically protect your code: </p>
|
||
<ul>
|
||
<li>Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches. </li>
|
||
<li>Convert special characters such as <code>?</code>, <code>&</code>, <code>/</code>, <code><</code>, <code>></code> and spaces to their respective HTML or URL encoded equivalents. </li>
|
||
<li>Give users the option to disable client-side scripts.</li>
|
||
<li>Redirect invalid requests.</li>
|
||
<li>Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.</li>
|
||
<li>Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.</li>
|
||
<li>Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.</li>
|
||
</ul>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>dompurify</code> to version 3.4.7 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/cure53/DOMPurify/security/advisories/GHSA-rp9w-3fw7-7cwq">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/cure53/DOMPurify/commit/ca30f070c360df162a3e3848e80e6fd3c9e74bff">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-DOMPURIFY-17344504">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Trust Boundary Violation</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
dompurify
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/cure53/DOMPurify">dompurify</a> is a DOM-only XSS sanitizer for HTML, MathML and SVG.</p>
|
||
<p>Affected versions of this package are vulnerable to Trust Boundary Violation through the mutation of <code>data.allowedTags</code> or <code>data.allowedAttributes</code> in hooks, which directly alters the global default sets used for sanitization. An attacker can cause persistent changes to the default allow-lists, enabling malicious tags or attributes to bypass sanitization in subsequent calls by injecting payloads that exploit the polluted configuration.</p>
|
||
<p><strong>Note:</strong></p>
|
||
<p>This is only exploitable if a hook is registered that mutates <code>data.allowedTags</code> or <code>data.allowedAttributes</code>, and later sanitization occurs without explicitly setting restrictive configuration arrays.</p>
|
||
<h2 id="poc">PoC</h2>
|
||
<pre><code class="language-js">// 1) fresh DOMPurify, default config — script is blocked
|
||
DOMPurify.sanitize('<svg><script>alert(1)</script></svg>');
|
||
// → "<svg></svg>"
|
||
|
||
// 2) install a hook that mutates data.allowedTags (natural-looking pattern)
|
||
DOMPurify.addHook('uponSanitizeElement', (node, data) => {
|
||
data.allowedTags['script'] = true;
|
||
});
|
||
|
||
// 3) one sanitize call WITH the hook — script survives (expected during the hook)
|
||
DOMPurify.sanitize('<svg><script>alert(1)</script></svg>');
|
||
// → "<svg><script>alert(1)</script></svg>"
|
||
|
||
// 4) remove the hook
|
||
DOMPurify.removeAllHooks();
|
||
DOMPurify.clearConfig();
|
||
|
||
// 5) sanitize attacker content with default config — POLLUTION PERSISTS
|
||
DOMPurify.sanitize('<svg><script>alert(1)</script></svg>');
|
||
// → "<svg><script>alert(1)</script></svg>" ← script survived without any hook
|
||
|
||
// 6) the only recovery: create a fresh DOMPurify instance
|
||
const fresh = DOMPurify(window);
|
||
fresh.sanitize('<svg><script>alert(1)</script></svg>');
|
||
// → "<svg></svg>" ← clean
|
||
</code></pre>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>dompurify</code> to version 3.4.7 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/cure53/DOMPurify/security/advisories/GHSA-76mc-f452-cxcm">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/cure53/DOMPurify/commit/ca30f070c360df162a3e3848e80e6fd3c9e74bff">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-DOMPURIFY-17344516">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Trust Boundary Violation</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
dompurify
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/cure53/DOMPurify">dompurify</a> is a DOM-only XSS sanitizer for HTML, MathML and SVG.</p>
|
||
<p>Affected versions of this package are vulnerable to Trust Boundary Violation in the <code>sanitize</code> function when handling DOM nodes from a different same-origin realm due to improper realm-bound <code>instanceof</code> checks. An attacker can inject and execute malicious markup by providing specially crafted DOM nodes from a foreign realm, which bypass internal security checks and allow executable content to persist in form attributes, template content, and attached shadow roots.</p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>dompurify</code> to version 3.4.6 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/cure53/DOMPurify/security/advisories/GHSA-hpcv-96wg-7vj8">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/cure53/DOMPurify/commit/bb7739e5bccec7e1ab3dae3f3e42d02db3acaaae">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-DOMPURIFY-17344526">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Prototype Pollution</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
dompurify
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/cure53/DOMPurify">dompurify</a> is a DOM-only XSS sanitizer for HTML, MathML and SVG.</p>
|
||
<p>Affected versions of this package are vulnerable to Prototype Pollution in the <code>IN_PLACE</code> function when sanitizing a root element that is a <code><form></code> with event handler attributes and a descendant element whose <code>name</code> attribute matches certain property names checked by <code>_isClobbered</code>. An attacker can cause malicious attributes, such as event handlers or JavaScript URIs, to persist on the root element by crafting a DOM structure where the root is clobbered and then passing it to the sanitizer in <code>IN_PLACE</code> mode. This allows the attacker to execute arbitrary JavaScript or bypass attribute-level defenses when the sanitized node is reinserted into the live document.</p>
|
||
<p><strong>Note:</strong></p>
|
||
<p>This is only exploitable if the sanitizer is used in <code>IN_PLACE</code> mode on a detached root element that is an <code>HTMLFormElement</code> with a clobber-named child.</p>
|
||
<h2 id="poc">PoC</h2>
|
||
<pre><code class="language-js"><!doctype html>
|
||
<html><body>
|
||
<script src="dist/purify.js"></script>
|
||
<script>
|
||
const root = document.createElement('form');
|
||
root.setAttribute('onmouseover', 'window.__rooted = 1');
|
||
const clobber = document.createElement('input');
|
||
clobber.setAttribute('name', 'nodeName');
|
||
root.appendChild(clobber);
|
||
|
||
// typeof root.nodeName === 'object' (an <INPUT> element), not 'string'.
|
||
// _isClobbered fires; _forceRemove(root) becomes a no-op because root.parentNode === null.
|
||
DOMPurify.sanitize(root, { IN_PLACE: true });
|
||
|
||
console.log('output:', root.outerHTML);
|
||
// <form onmouseover="window.__rooted = 1"><input name="nodeName"></form>
|
||
// ^^^^^^^^^^^^^^^^^^ event handler survived ^^^^^^^^^^^^^^^^^^
|
||
|
||
document.body.appendChild(root);
|
||
root.dispatchEvent(new MouseEvent('mouseover', { bubbles: true }));
|
||
console.log('handler fired:', window.__rooted === 1); // true
|
||
</script>
|
||
</body></html>
|
||
</code></pre>
|
||
<h2 id="details">Details</h2>
|
||
<p>Prototype Pollution is a vulnerability affecting JavaScript. Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects. JavaScript allows all Object attributes to be altered, including their magical attributes such as <code>__proto__</code>, <code>constructor</code> and <code>prototype</code>. An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values. Properties on the <code>Object.prototype</code> are then inherited by all the JavaScript objects through the prototype chain. When that happens, this leads to either denial of service by triggering JavaScript exceptions, or it tampers with the application source code to force the code path that the attacker injects, thereby leading to remote code execution.</p>
|
||
<p>There are two main ways in which the pollution of prototypes occurs:</p>
|
||
<ul>
|
||
<li><p>Unsafe <code>Object</code> recursive merge</p>
|
||
</li>
|
||
<li><p>Property definition by path</p>
|
||
</li>
|
||
</ul>
|
||
<h3 id="unsafe-object-recursive-merge">Unsafe Object recursive merge</h3>
|
||
<p>The logic of a vulnerable recursive merge function follows the following high-level model:</p>
|
||
<pre><code>merge (target, source)
|
||
|
||
foreach property of source
|
||
|
||
if property exists and is an object on both the target and the source
|
||
|
||
merge(target[property], source[property])
|
||
|
||
else
|
||
|
||
target[property] = source[property]
|
||
</code></pre>
|
||
<br>
|
||
|
||
<p>When the source object contains a property named <code>__proto__</code> defined with <code>Object.defineProperty()</code> , the condition that checks if the property exists and is an object on both the target and the source passes and the merge recurses with the target, being the prototype of <code>Object</code> and the source of <code>Object</code> as defined by the attacker. Properties are then copied on the <code>Object</code> prototype.</p>
|
||
<p>Clone operations are a special sub-class of unsafe recursive merges, which occur when a recursive merge is conducted on an empty object: <code>merge({},source)</code>.</p>
|
||
<p><code>lodash</code> and <code>Hoek</code> are examples of libraries susceptible to recursive merge attacks.</p>
|
||
<h3 id="property-definition-by-path">Property definition by path</h3>
|
||
<p>There are a few JavaScript libraries that use an API to define property values on an object based on a given path. The function that is generally affected contains this signature: <code>theFunction(object, path, value)</code></p>
|
||
<p>If the attacker can control the value of “path”, they can set this value to <code>__proto__.myValue</code>. <code>myValue</code> is then assigned to the prototype of the class of the object.</p>
|
||
<h2 id="types-of-attacks">Types of attacks</h2>
|
||
<p>There are a few methods by which Prototype Pollution can be manipulated:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Type</th>
|
||
<th>Origin</th>
|
||
<th>Short description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr>
|
||
<td><strong>Denial of service (DoS)</strong></td>
|
||
<td>Client</td>
|
||
<td>This is the most likely attack. <br>DoS occurs when <code>Object</code> holds generic functions that are implicitly called for various operations (for example, <code>toString</code> and <code>valueOf</code>). <br> The attacker pollutes <code>Object.prototype.someattr</code> and alters its state to an unexpected value such as <code>Int</code> or <code>Object</code>. In this case, the code fails and is likely to cause a denial of service. <br><strong>For example:</strong> if an attacker pollutes <code>Object.prototype.toString</code> by defining it as an integer, if the codebase at any point was reliant on <code>someobject.toString()</code> it would fail.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Remote Code Execution</strong></td>
|
||
<td>Client</td>
|
||
<td>Remote code execution is generally only possible in cases where the codebase evaluates a specific attribute of an object, and then executes that evaluation.<br><strong>For example:</strong> <code>eval(someobject.someattr)</code>. In this case, if the attacker pollutes <code>Object.prototype.someattr</code> they are likely to be able to leverage this in order to execute code.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Property Injection</strong></td>
|
||
<td>Client</td>
|
||
<td>The attacker pollutes properties that the codebase relies on for their informative value, including security properties such as cookies or tokens.<br> <strong>For example:</strong> if a codebase checks privileges for <code>someuser.isAdmin</code>, then when the attacker pollutes <code>Object.prototype.isAdmin</code> and sets it to equal <code>true</code>, they can then achieve admin privileges.</td>
|
||
</tr>
|
||
</tbody></table>
|
||
<h2 id="affected-environments">Affected environments</h2>
|
||
<p>The following environments are susceptible to a Prototype Pollution attack:</p>
|
||
<ul>
|
||
<li><p>Application server</p>
|
||
</li>
|
||
<li><p>Web server</p>
|
||
</li>
|
||
<li><p>Web browser</p>
|
||
</li>
|
||
</ul>
|
||
<h2 id="how-to-prevent">How to prevent</h2>
|
||
<ol>
|
||
<li><p>Freeze the prototype— use <code>Object.freeze (Object.prototype)</code>.</p>
|
||
</li>
|
||
<li><p>Require schema validation of JSON input.</p>
|
||
</li>
|
||
<li><p>Avoid using unsafe recursive merge functions.</p>
|
||
</li>
|
||
<li><p>Consider using objects without prototypes (for example, <code>Object.create(null)</code>), breaking the prototype chain and preventing pollution.</p>
|
||
</li>
|
||
<li><p>As a best practice use <code>Map</code> instead of <code>Object</code>.</p>
|
||
</li>
|
||
</ol>
|
||
<h3 id="for-more-information-on-this-vulnerability-type">For more information on this vulnerability type:</h3>
|
||
<p><a href="https://github.com/HoLyVieR/prototype-pollution-nsec18/blob/master/paper/JavaScript_prototype_pollution_attack_in_NodeJS.pdf">Arteau, Olivier. “JavaScript prototype pollution attack in NodeJS application.” GitHub, 26 May 2018</a></p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>dompurify</code> to version 3.4.6 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/cure53/DOMPurify/security/advisories/GHSA-r47g-fvhr-h676">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/cure53/DOMPurify/commit/bb7739e5bccec7e1ab3dae3f3e42d02db3acaaae">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-DOMPURIFY-17344538">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Cross-site Scripting (XSS)</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
dompurify
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/cure53/DOMPurify">dompurify</a> is a DOM-only XSS sanitizer for HTML, MathML and SVG.</p>
|
||
<p>Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the <code>SAFE_FOR_TEMPLATES</code> function. An attacker can inject template expressions that survive sanitization inside <code><template></code> element content by splitting malicious expressions across adjacent text nodes, which are not properly scrubbed. This allows execution of arbitrary code or exfiltration of sensitive data if a downstream template engine evaluates the merged content.</p>
|
||
<p>This is only exploitable if both <code>SAFE_FOR_TEMPLATES: true</code> and either <code>RETURN_DOM: true</code>, <code>RETURN_DOM_FRAGMENT: true</code>, or <code>IN_PLACE: true</code> are explicitly set, and the application processes <code><template>.content</code> with a template engine.</p>
|
||
<h2 id="details">Details</h2>
|
||
<p>Cross-site scripting (or XSS) is a code vulnerability that occurs when an attacker “injects” a malicious script into an otherwise trusted website. The injected script gets downloaded and executed by the end user’s browser when the user interacts with the compromised website.</p>
|
||
<p>This is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.</p>
|
||
<p>Injecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.</p>
|
||
<p>Escaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, <code><</code> can be coded as <code>&lt</code>; and <code>></code> can be coded as <code>&gt</code>; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses <code><</code> and <code>></code> as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.</p>
|
||
<p>The most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware. </p>
|
||
<h3 id="types-of-attacks">Types of attacks</h3>
|
||
<p>There are a few methods by which XSS can be manipulated:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Type</th>
|
||
<th>Origin</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr>
|
||
<td><strong>Stored</strong></td>
|
||
<td>Server</td>
|
||
<td>The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Reflected</strong></td>
|
||
<td>Server</td>
|
||
<td>The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>DOM-based</strong></td>
|
||
<td>Client</td>
|
||
<td>The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Mutated</strong></td>
|
||
<td></td>
|
||
<td>The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.</td>
|
||
</tr>
|
||
</tbody></table>
|
||
<h3 id="affected-environments">Affected environments</h3>
|
||
<p>The following environments are susceptible to an XSS attack:</p>
|
||
<ul>
|
||
<li>Web servers</li>
|
||
<li>Application servers</li>
|
||
<li>Web application environments</li>
|
||
</ul>
|
||
<h3 id="how-to-prevent">How to prevent</h3>
|
||
<p>This section describes the top best practices designed to specifically protect your code: </p>
|
||
<ul>
|
||
<li>Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches. </li>
|
||
<li>Convert special characters such as <code>?</code>, <code>&</code>, <code>/</code>, <code><</code>, <code>></code> and spaces to their respective HTML or URL encoded equivalents. </li>
|
||
<li>Give users the option to disable client-side scripts.</li>
|
||
<li>Redirect invalid requests.</li>
|
||
<li>Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.</li>
|
||
<li>Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.</li>
|
||
<li>Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.</li>
|
||
</ul>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>dompurify</code> to version 3.4.8 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/cure53/DOMPurify/security/advisories/GHSA-gvmj-g25r-r7wr">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/cure53/DOMPurify/commit/bcdd8285412dc9c4c149652aed2d712e790d6ccf">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-DOMPURIFY-17344549">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--medium" data-snyk-test="medium">
|
||
<h2 class="card__title">Improper Initialization</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--medium">
|
||
<span class="label__text">medium severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Not Defined</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
dompurify
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/cure53/DOMPurify">dompurify</a> is a DOM-only XSS sanitizer for HTML, MathML and SVG.</p>
|
||
<p>Affected versions of this package are vulnerable to Improper Initialization in the <code>DOMPurify.setConfig()</code> API when an <code>uponSanitizeAttribute</code> hook is registered that mutates <code>allowedAttributes</code>. An attacker can cause persistent modification of the attribute allowlist by submitting specially crafted content, resulting in unauthorized attributes being permitted in all subsequent sanitization calls.</p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>dompurify</code> to version 3.4.11 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/cure53/DOMPurify/security/advisories/GHSA-cmwh-pvxp-8882">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/cure53/DOMPurify/commit/011bc3b2fcc4be17aa76f9030e8668207717acb9">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-DOMPURIFY-17375136">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
<div class="card card--vuln disclosure--not-new severity--low" data-snyk-test="low">
|
||
<h2 class="card__title">Protection Mechanism Failure</h2>
|
||
<div class="card__section">
|
||
|
||
<div class="card__labels">
|
||
<div class="label label--low">
|
||
<span class="label__text">low severity</span>
|
||
</div>
|
||
<div class="label label--exploit">
|
||
<span class="label__text">Exploit: Proof of Concept</span>
|
||
</div>
|
||
</div>
|
||
|
||
<hr/>
|
||
|
||
<ul class="card__meta">
|
||
<li class="card__meta__item">
|
||
Manifest file: /argo-cd <span class="list-paths__item__arrow">›</span> ui/pnpm-lock.yaml
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Package Manager: npm
|
||
</li>
|
||
<li class="card__meta__item">
|
||
Vulnerable module:
|
||
|
||
dompurify
|
||
</li>
|
||
|
||
<li class="card__meta__item">Introduced through:
|
||
|
||
|
||
[email protected], [email protected] and others
|
||
</li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
|
||
<h3 class="card__section__title">Detailed paths</h3>
|
||
|
||
<ul class="card__meta__paths">
|
||
<li>
|
||
<span class="list-paths__item__introduced"><em>Introduced through</em>:
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
<span class="list-paths__item__arrow">›</span>
|
||
[email protected]
|
||
|
||
</span>
|
||
|
||
</li>
|
||
</ul><!-- .list-paths -->
|
||
|
||
</div><!-- .card__section -->
|
||
|
||
<hr/>
|
||
<!-- Overview -->
|
||
<h2 id="overview">Overview</h2>
|
||
<p><a href="https://github.com/cure53/DOMPurify">dompurify</a> is a DOM-only XSS sanitizer for HTML, MathML and SVG.</p>
|
||
<p>Affected versions of this package are vulnerable to Protection Mechanism Failure through the <code>clearConfig</code> function. An attacker can execute arbitrary scripts in a Trusted Types sink by influencing a previously supplied <code>TRUSTED_TYPES_POLICY</code> on a reused instance and later triggering output with <code>RETURN_TRUSTED_TYPE: true</code>.</p>
|
||
<p><strong>Note:</strong></p>
|
||
<p>This is only exploitable if a DOMPurify instance is reused across trust boundaries and a less-trusted integration or attacker has previously set an unsafe Trusted Types policy.</p>
|
||
<h2 id="remediation">Remediation</h2>
|
||
<p>Upgrade <code>dompurify</code> to version 3.4.9 or higher.</p>
|
||
<h2 id="references">References</h2>
|
||
<ul>
|
||
<li><a href="https://github.com/cure53/DOMPurify/security/advisories/GHSA-vxr8-fq34-vvx9">GitHub Advisory</a></li>
|
||
<li><a href="https://github.com/cure53/DOMPurify/commit/52102472d46035857c52df19e44285f8a1e102fc">GitHub Commit</a></li>
|
||
</ul>
|
||
|
||
<hr/>
|
||
|
||
<div class="cta card__cta">
|
||
<p><a href="https://snyk.io/vuln/SNYK-JS-DOMPURIFY-17344552">More about this vulnerability</a></p>
|
||
</div>
|
||
|
||
</div><!-- .card -->
|
||
</div><!-- cards -->
|
||
</div>
|
||
</main><!-- .layout-stacked__content -->
|
||
</body>
|
||
|
||
</html>
|