Skip to content

Commit 23ea13a

Browse files
guguclaude
andcommitted
Fix yarn audit vulnerabilities across backend and frontend
- Upgrade nodemailer ^8.0.2 → ^8.0.4 (SMTP command injection, low) - Upgrade @angular/* ~20.3.16 → ~20.3.18 (XSS in i18n bindings, high) - Upgrade lodash-es ^4.17.21 → ^4.17.23 + resolution (prototype pollution, moderate) - Replace private-ip with ipaddr.js for private IP detection (SSRF, high, no patch available) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3546084 commit 23ea13a

5 files changed

Lines changed: 100 additions & 124 deletions

File tree

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"langchain": "^1.2.34",
8080
"lru-cache": "^11.2.7",
8181
"nanoid": "5.1.7",
82-
"nodemailer": "^8.0.2",
82+
"nodemailer": "^8.0.4",
8383
"nunjucks": "^3.2.4",
8484
"openai": "^6.32.0",
8585
"otplib": "^12.0.1",

frontend/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
},
1818
"private": true,
1919
"dependencies": {
20-
"@angular/animations": "~20.3.16",
20+
"@angular/animations": "~20.3.18",
2121
"@angular/cdk": "~20.2.14",
22-
"@angular/common": "~20.3.16",
23-
"@angular/compiler": "~20.3.16",
24-
"@angular/core": "~20.3.16",
25-
"@angular/forms": "~20.3.16",
22+
"@angular/common": "~20.3.18",
23+
"@angular/compiler": "~20.3.18",
24+
"@angular/core": "~20.3.18",
25+
"@angular/forms": "~20.3.18",
2626
"@angular/material": "~20.2.14",
27-
"@angular/platform-browser": "~20.3.16",
28-
"@angular/platform-browser-dynamic": "~20.3.16",
29-
"@angular/router": "~20.3.16",
27+
"@angular/platform-browser": "~20.3.18",
28+
"@angular/platform-browser-dynamic": "~20.3.18",
29+
"@angular/router": "~20.3.18",
3030
"@brumeilde/ngx-theme": "^1.2.1",
3131
"@fontsource/ibm-plex-mono": "^5.2.7",
3232
"@fontsource/noto-sans": "^5.2.10",
@@ -54,7 +54,7 @@
5454
"knip": "^5.79.0",
5555
"libphonenumber-js": "^1.12.9",
5656
"lodash": "^4.17.21",
57-
"lodash-es": "^4.17.21",
57+
"lodash-es": "^4.17.23",
5858
"mermaid": "^11.12.1",
5959
"monaco-editor": "0.55.1",
6060
"ng-dynamic-component": "^10.8.0",
@@ -65,7 +65,6 @@
6565
"pluralize": "^8.0.0",
6666
"postgres-interval": "^4.0.2",
6767
"posthog-js": "^1.341.0",
68-
"private-ip": "^3.0.2",
6968
"puppeteer": "^24.29.1",
7069
"rxjs": "^7.4.0",
7170
"tslib": "^2.8.1",
@@ -77,8 +76,8 @@
7776
"@angular-devkit/build-angular": "20",
7877
"@angular/build": "20.3.14",
7978
"@angular/cli": "~20.3.14",
80-
"@angular/compiler-cli": "~20.3.16",
81-
"@angular/language-service": "~20.3.16",
79+
"@angular/compiler-cli": "~20.3.18",
80+
"@angular/language-service": "~20.3.18",
8281
"@sentry-internal/rrweb": "^2.16.0",
8382
"@storybook/angular": "^10.2.14",
8483
"@types/node": "^22.10.2",
@@ -92,7 +91,8 @@
9291
},
9392
"resolutions": {
9493
"mermaid": "^11.10.0",
95-
"webpack": "5.104.1"
94+
"webpack": "5.104.1",
95+
"lodash-es": "4.17.23"
9696
},
9797
"packageManager": "yarn@1.22.22"
9898
}

frontend/src/app/validators/hostname.validator.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
2-
import is_ip_private from 'private-ip';
2+
import * as ipaddr from 'ipaddr.js';
33
import isFQDN from 'validator/es/lib/isFQDN';
44
import isIP from 'validator/es/lib/isIP';
55
import { DBtype } from '../models/connection';
66

7+
const PRIVATE_RANGES = new Set(['private', 'loopback', 'linkLocal', 'unspecified', 'carrierGradeNat', 'uniqueLocal']);
8+
9+
function isPrivateIP(ip: string): boolean {
10+
try {
11+
return PRIVATE_RANGES.has(ipaddr.process(ip).range());
12+
} catch {
13+
return false;
14+
}
15+
}
16+
717
export function hostnameValidation(dbType: DBtype): ValidatorFn {
818
return (control: AbstractControl): ValidationErrors | null => {
919
if (control.value) {
@@ -21,7 +31,7 @@ export function hostnameValidation(dbType: DBtype): ValidatorFn {
2131
hostname = hostname.replace(/^mongodb\+srv:\/\//, '');
2232
}
2333

24-
if (control.value === 'localhost' || (isIP(control.value) && is_ip_private(control.value)))
34+
if (control.value === 'localhost' || (isIP(control.value) && isPrivateIP(control.value)))
2535
return { isLocalhost: true };
2636
if (!(isIP(hostname) || isFQDN(hostname))) return { isInvalidHostname: true };
2737
}

0 commit comments

Comments
 (0)