Skip to content

fix(security): patch 60 vulnerabilities + update deps, orb, docker - #295

Draft
gibaros wants to merge 2 commits into
mainfrom
chore/repo-maintenance-16Sept2026
Draft

gibaros wants to merge 2 commits into
mainfrom
chore/repo-maintenance-16Sept2026

Conversation

@gibaros

@gibaros gibaros commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

🔒 Security & Dependency Updates


Summary

This PR updates dependencies and applies security patches to address vulnerabilities.

Confidence Score: 78% ⚠️ (Draft PR - requires review)

  • ❌ Tests failed
  • ⚠️ 3 unfixable vulnerabilities

📦 Dependency Updates (11 packages)

Updated all dependencies to latest versions via npm run dep:update:

Package From To Type
@hapi/hapi 21.4.7 21.4.10 patch
@hapi/inert 7.1.0 7.1.2 patch
@mojaloop/central-services-error-handling 13.1.6 13.2.0 minor
@mojaloop/central-services-logger 11.10.4 11.10.6 patch
@mojaloop/central-services-metrics 12.8.5 12.8.8 patch
View all 11 dependency updates

Dependencies

  • @hapi/hapi: 21.4.7 → 21.4.10 (patch)
  • @hapi/inert: 7.1.0 → 7.1.2 (patch)
  • @mojaloop/central-services-error-handling: 13.1.6 → 13.2.0 (minor)
  • @mojaloop/central-services-logger: 11.10.4 → 11.10.6 (patch)
  • @mojaloop/central-services-metrics: 12.8.5 → 12.8.8 (patch)
  • @mojaloop/central-services-shared: 18.35.6 → 18.39.3 (minor)
  • @mojaloop/event-sdk: 14.8.3 → 14.8.5 (patch)
  • axios: 1.13.6 → 1.20.0 (minor)
  • lodash: 4.17.23 → 4.18.1 (minor)
  • npm-check-updates: 19.6.5 → 23.1.0 (major)
  • pre-commit: 1.2.2 → 2.0.0 (major)

🔄 CircleCI Orb Update

Updated the Mojaloop CI/CD orb to the latest version:

Component From To
mojaloop/build 1.1.19 2.1.7

Source: mojaloop/ci-config-orb-build


🐳 Docker Image Updates

Base Image Update

Updated the Node.js Alpine base image to the latest version:

Component From To
Node.js Alpine 22.22.0-alpine3.23 24.21.0-alpine3.24

Docker CVE Suppressions

Added 9 Docker-specific vulnerability suppression(s) to .grype.yaml.
These are Alpine (apk), Node.js binary, or base image npm vulnerabilities that cannot be fixed via application dependencies.

Docker Image Scan Results

Category Count
npm (application) 0
npm (base image) 9
Alpine (apk) 3
Binary (Node.js) 0
Total 12

🛡️ Security Patches (60 vulnerabilities fixed)

Applied targeted security fixes for remaining vulnerabilities:

Critical Severity

  • axios - Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, an attacker who can influence the target URL of an Axios request can use any address in the 127.0.0.0/8 range (other than 127.0.0.1) to completely bypass the NO_PROXY protection. This vulnerability is due to an incomplete for CVE-2025-62718, This vulnerability is fixed in 1.15.1 and 0.31.1.

  • axios - Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.0 and 0.31.0, Axios does not correctly handle hostname normalization when checking NO_PROXY rules. Requests to loopback addresses like localhost. (with a trailing dot) or [::1] (IPv6 literal) skip NO_PROXY matching and go through the configured proxy. This goes against what developers expect and lets attackers force requests through a proxy, even if NO_PROXY is set up to protect loopback or internal services. This issue leads to the possibility of proxy bypass and SSRF vulnerabilities allowing attackers to reach sensitive loopback or internal services despite the configured protections. This vulnerability is fixed in 1.15.0 and 0.31.0.

  • lodash - Impact:

The fix for CVE-2021-23337 (GHSA-35jh-r3h4-6jhm) added validation for the variable option in _.template but did not apply the same validation to options.imports key names. Both paths flow into the same Function() constructor sink.

When an application passes untrusted input as options.imports key names, an attacker can inject default-parameter expressions that execute arbitrary code at template compilation time.

Additionally, _.template uses assignInWith to merge imports, which enumerates inherited properties via for..in. If Object.prototype has been polluted by any other vector, the polluted keys are copied into the imports object and passed to Function().

Patches:

Users should upgrade to version 4.18.0.

Workarounds:

Do not pass untrusted input as key names in options.imports. Only use developer-controlled, static key names.

  • Fixed: 4.17.23 → 4.18.0

  • GHSA-r5fr-rjxr-66jc | CVE-2026-4800

  • axios - Axios is a promise based HTTP client for the browser and Node.js. From 1.0.0 to before 1.15.2, he Axios library is vulnerable to a Prototype Pollution "Gadget" attack that allows any Object.prototype pollution in the application's dependency tree to be escalated into surgical, invisible modification of all JSON API responses — including privilege escalation, balance manipulation, and authorization bypass. The default transformResponse function at lib/defaults/index.js:124 calls JSON.parse(data, this.parseReviver), where this is the merged config object. Because parseReviver is not present in Axios defaults, not validated by assertOptions, and not subject to any constraints, a polluted Object.prototype.parseReviver function is called for every key-value pair in every JSON response, allowing the attacker to selectively modify individual values while leaving the rest of the response intact. This vulnerability is fixed in 1.15.2.

  • axios - Axios is a promise based HTTP client for the browser and Node.js. From version 1.0.0 to before version 1.15.2, fFive config properties (auth, baseURL, socketPath, beforeRedirect, and insecureHTTPParser) in the HTTP adapter are read via direct property access without hasOwnProperty guards, making them exploitable as prototype pollution gadgets. When Object.prototype is polluted by another dependency in the same process, axios silently picks up these polluted values on every outbound HTTP request. This issue has been patched in version 1.15.2.

  • handlebars - Handlebars.js has JavaScript Injection via AST Type Confusion

  • convict - Convict has Prototype Pollution via startsWith() function

High Severity

  • axios - axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in config.proxy

  • axios - Axios is a promise based HTTP client for the browser and Node.js. Prior to 0.32.0 and 1.16.0, axios exposes two read-side prototype-pollution gadgets. When Object.prototype is polluted by an upstream dependency in the same process (e.g. lodash _.merge / CVE-2018-16487), axios silently picks up the polluted values. (1) lib/utils.js line 406 builds merge()'s accumulator as result = {}, so result[targetKey] (line 414) walks Object.prototype and the polluted bucket's own keys are copied into the merged headers and ride out on the wire. (2) lib/core/mergeConfig.js line 26 builds the hasOwnProperty descriptor as a plain-object literal. Object.defineProperty reads descriptor.get/descriptor.set via the prototype chain, so a polluted Object.prototype.get or Object.prototype.set makes the call throw TypeError synchronously on every axios request. This vulnerability is fixed in 0.32.0 and 1.16.0.

  • axios - Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, he fix for no_proxy hostname normalization bypass is incomplete. When no_proxy=localhost is set, requests to 127.0.0.1 and [::1] still route through the proxy instead of bypassing it. The shouldBypassProxy() function does pure string matching — it does not resolve IP aliases or loopback equivalents. This vulnerability is fixed in 1.15.1 and 0.31.1.

  • axios - Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, toFormData recursively walks nested objects with no depth limit, so a deeply nested value passed as request data crashes the Node.js process with a RangeError. This vulnerability is fixed in 1.15.1 and 0.31.1.

  • axios - Axios: Regular Expression Denial of Service (ReDoS) via Cookie Name Injection

  • axios - Allocation of Resources Without Limits or Throttling in Axios

  • axios - Axios: Proxy-Authorization header leaks to redirect target when proxy is re-evaluated to direct connection

  • axios - axios versions from 0.28.0 before 0.33.0 and from 1.0.0 before 1.18.0 contain uncontrolled recursion in formDataToJSON (exposed as axios.formToJSON() and used internally when serializing FormData with Content-Type: application/json). When an application passes attacker-controlled FormData field names, a field name with thousands of nested bracket-delimited segments causes unbounded recursion in buildPath(), exhausting the JavaScript call stack (RangeError: Maximum call stack size exceeded) and causing denial of service for that request, or process termination in applications without appropriate error handling.

  • axios - axios versions 1.7.0 before 1.18.0 fail to enforce maxBodyLength for WHATWG ReadableStream request bodies in the fetch adapter when Content-Length cannot be determined. Attackers can supply unknown-length stream data to bypass upload size limits and cause uncontrolled network egress or resource exhaustion.

  • axios - axios versions 0.28.0 and later contain uncontrolled recursion in formDataToJSON when processing FormData field names with deeply nested bracket segments. Attackers can supply FormData with field names containing thousands of nested brackets to exhaust the JavaScript call stack and trigger RangeError, causing request failure or process termination in applications that do not handle the exception.

  • axios - Axios: Prototype Pollution Gadgets - Response Tampering, Data Exfiltration, and Request Hijacking

  • axios - Axios: Header Injection via Prototype Pollution

  • axios - axios is vulnerable to read-side prototype-pollution gadgets that can alter request construction when Object.prototype has already been polluted by a separate vulnerability or dependency. In the bodyless method aliases (axios.get(), axios.delete(), axios.head(), axios.options()), inherited data is read via (config || {}).data before config normalization, causing an attacker-controlled body to be sent on requests that did not set one. Additional low-level paths, only reachable when calling exported adapters/helpers (e.g. lib/adapters/http.js, unsafe/helpers/resolveConfig.js) directly with plain configs and no own proxy or paramsSerializer, can inherit polluted proxy values (routing requests through an attacker-controlled proxy) or paramsSerializer values (attacker-controlled URL serialization). These low-level gadgets do not reproduce through normal high-level axios calls on 1.15.2+. The issue is fixed in axios 1.18.0 and 0.33.0.

  • axios - axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollution Gadget in Config Merge

  • axios - Axios: Proxy-Authorization Credential Leak to Origin Server Across HTTP-to-HTTPS Redirect in Axios Node.js HTTP Adapter

  • protobufjs - protobufjs compiles protobuf definitions into JavaScript (JS) functions. Prior to 7.6.5 and 8.6.6, protobufjs parsed option names by advancing through schema tokens until reaching an = token without checking for end of input, so a crafted .proto schema that opens an option declaration and ends prematurely can cause parse, Root.load, or Root.loadSync to loop indefinitely. This issue is fixed in versions 7.6.5 and 8.6.6.

  • @grpc/grpc-js - @grpc/grpc-js: A malformed request can cause a server crash

  • @hapi/content - @hapi/content header parser has a parameter smuggling issue that allows upload-filter bypass via duplicate parameters

  • brace-expansion - brace-expansion: DoS via unbounded intermediate arrays, bypassing the CVE-2026-14257 mitigation

  • fast-uri - fast-uri vulnerable to server-side request forgery via malformed IPv6 normalization

  • form-data - form-data: CRLF injection in form-data via unescaped multipart field names and filenames

  • immutable - Immutable.js List 32-bit trie overflow → unrecoverable DoS

  • js-yaml - js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources

  • linkify-it - linkify-it: Quadratic-complexity DoS via the mailto: validator scan-loop on attacker text

  • path-to-regexp - path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters

  • picomatch - Picomatch has a ReDoS vulnerability via extglob quantifiers

  • nanoid - nanoid: custom generators can loop indefinitely when size is zero

  • fast-xml-builder - fast-xml-builder allows attribute values with unwanted quotes to bypass malicious or unwanted attributes

Moderate Severity

  • lodash - lodash vulnerable to Prototype Pollution via array path bypass in _.unset and _.omit

  • axios - Axios: XSRF Token Cross-Origin Leakage via Prototype Pollution Gadget in withXSRFToken Boolean Coercion

  • @hapi/inert - @hapi/inert has a static-file confinement bypass via sibling-prefix path

  • axios - Axios: CRLF Injection in multipart/form-data body via unsanitized blob.type in formDataToStream

  • axios - Axios' HTTP adapter-streamed uploads bypass maxBodyLength when maxRedirects: 0

  • axios - Axios: HTTP adapter streamed responses bypass maxContentLength

  • joi - joi has an uncaught RangeError on deeply nested input through recursive link() schemas

  • axios - Axios: Authentication Bypass via Prototype Pollution Gadget in validateStatus Merge Strategy

  • axios - Axios has Unrestricted Cloud Metadata Exfiltration via Header Injection Chain

  • axios - Axios: HTTP/2 streamed uploads bypass maxBodyLength

  • axios - Axios: Nested axios option objects can consume polluted prototype values

  • postcss - PostCSS: incomplete fix of GHSA-6g55-p6wh-862q — attacker-controlled sourceMappingURL reads arbitrary .map files when from is unset

  • undici - undici vulnerable to downstream response desynchronization via retry interceptor

  • mysql2 - MySQL2: Unbounded zlib inflate in compressed MySQL protocol handler allows decompression-bomb DoS

  • @hapi/wreck - @hapi/wreck: Sensitive credential headers leak across cross-port and cross-scheme redirects

  • fast-xml-parser - fast-xml-parser XMLBuilder: XML Comment and CDATA Injection via Unescaped Delimiters

  • sanitize-html - ApostropheCMS: Mutation-XSS / allowedTags bypass via literal </textarea/> solidus close

  • body-parser - Impact: In body-parser versions prior to 1.20.6 (1.x line) and 2.3.0 (2.x line), when the parser is configured with an invalid limit option value such as an unparseable string or NaN, bytes.parse returns null and the request body size check is silently skipped. Applications that rely on limit as their primary safeguard against oversized request bodies will accept arbitrarily large payloads, leading to excessive memory and CPU usage and denial of service. Patches: This issue is fixed in body-parser 1.20.6 and 2.3.0. After the fix, invalid limit values throw a clear error at parser construction time instead of silently disabling enforcement, while null and undefined continue to fall back to the default limit of 100kb. Workarounds: Validate the limit value before passing it to body-parser. For example, parse the value at startup and reject any configuration where the result is null or a non-finite number.

  • markdown-it - markdown-it: Quadratic complexity DoS in smartquotes rule via replaceAt string operations

  • qs - qs array-limit bypass via bracket-key comma parsing

  • yaml - yaml is vulnerable to Stack Overflow via deeply nested YAML collections

  • follow-redirects - follow-redirects leaks Custom Authentication Headers to Cross-Domain Redirect Targets

Low Severity


⚠️ Unfixable Vulnerabilities (3 remaining)

The following vulnerabilities could not be automatically fixed:

Package Severity Reason Advisory
sanitize-html moderate Override would bump sanitize-html from v1 to v2 (major version change may break consumers) GHSA-vccv-cmxp-4j9h
sanitize-html moderate Override would bump sanitize-html from v1 to v2 (major version change may break consumers) GHSA-g8qq-57p8-ggw5
qs moderate Override would bump qs from v2 to v6 (major version change may break consumers) GHSA-4mjr-xmp4-gh2g

Action Required: Manual review recommended for unfixable vulnerabilities.


📋 Audit CI Allowlist Updates

Added 22 unfixable vulnerability ID(s) to audit-ci.jsonc allowlist.
These are transitive vulnerabilities in upstream dependencies that cannot be resolved here.

GHSA ID
GHSA-vccv-cmxp-4j9h
GHSA-g8qq-57p8-ggw5
GHSA-4mjr-xmp4-gh2g
GHSA-3w6x-2g7m-8v23
GHSA-q8qp-cvcw-x6jj
GHSA-hfxv-24rg-xrqf
GHSA-777c-7fjr-54vf
GHSA-p92q-9vqr-4j8v
GHSA-j5f8-grm9-p9fc
GHSA-3g43-6gmg-66jw
GHSA-35jp-ww65-95wh
GHSA-898c-q2cr-xwhg
GHSA-pjwm-pj3p-43mv
GHSA-mmx7-hfxf-jppx
GHSA-pmv8-rq9r-6j72
GHSA-mwf2-3pr3-8698
GHSA-7q8q-rj6j-mhjq
GHSA-jqh4-m9w3-8hp9
GHSA-f4gw-2p7v-4548
GHSA-42h9-826w-cgv3
GHSA-hcpx-6fm6-wx23
GHSA-x5fp-wj9c-mxmx

🔍 Grype npm Vulnerability Ignores

Added 22 unfixable npm vulnerability ignore(s) to .grype.yaml.
These are transitive npm vulnerabilities that are also checked by Grype CI scans.

GHSA/CVE ID Package
GHSA-vccv-cmxp-4j9h sanitize-html
GHSA-g8qq-57p8-ggw5 sanitize-html
GHSA-4mjr-xmp4-gh2g qs
GHSA-3w6x-2g7m-8v23 unknown
GHSA-q8qp-cvcw-x6jj unknown
GHSA-hfxv-24rg-xrqf unknown
GHSA-777c-7fjr-54vf unknown
GHSA-p92q-9vqr-4j8v unknown
GHSA-j5f8-grm9-p9fc unknown
GHSA-3g43-6gmg-66jw unknown
GHSA-35jp-ww65-95wh unknown
GHSA-898c-q2cr-xwhg unknown
GHSA-pjwm-pj3p-43mv unknown
GHSA-mmx7-hfxf-jppx unknown
GHSA-pmv8-rq9r-6j72 unknown
GHSA-mwf2-3pr3-8698 unknown
GHSA-7q8q-rj6j-mhjq unknown
GHSA-jqh4-m9w3-8hp9 unknown
GHSA-f4gw-2p7v-4548 unknown
GHSA-42h9-826w-cgv3 unknown
GHSA-hcpx-6fm6-wx23 unknown
GHSA-x5fp-wj9c-mxmx unknown

✅ Validation Results

Tests (after changes)

  • Status: ❌ Failed
  • Command: npm test

🤖 Automated Changes

This PR was automatically generated by ml-repo-maintenance.

Changed Files:

  • package.json - Updated dependency versions and added npm overrides
  • .circleci/config.yml - Updated orb version
  • .nvmrc - Updated Node.js version: 22.22.1 → 24.21.0
  • Dockerfile - Updated Node.js Alpine base image
  • .grype.yaml - Added Docker vulnerability suppressions and npm vulnerability ignores

Review Checklist:

  • Review dependency updates for breaking changes
  • Review security patches
  • Review CircleCI orb update
  • Review Docker base image update
  • Check test coverage
  • Verify build artifacts

🤖 Generated with ml-repo-maintenance

Co-Authored-By: ml-repo-maintenance noreply@mojaloop.org

🤖 Automated maintenance (dependencies + security)

🔒 Security & Dependency Updates


Summary

This PR updates dependencies and applies security patches to address vulnerabilities.

Confidence Score: 90% ✅ (Standard PR - ready for review)


✅ Validation Results

No validation checks were run.


🤖 Automated Changes

This PR was automatically generated by ml-repo-maintenance.

Changed Files:

  • package.json - Updated dependency versions and added npm overrides

Review Checklist:

  • Review dependency updates for breaking changes
  • Review security patches
  • Check test coverage
  • Verify build artifacts

🤖 Generated with ml-repo-maintenance

Co-Authored-By: ml-repo-maintenance noreply@mojaloop.org

- Updated 11 dependencies
- Fixed 60 security vulnerabilities
- Updated CircleCI orb: 1.1.19 → 2.1.7
- Updated Docker base image: 22.22.0-alpine3.23 → 24.21.0-alpine3.24
- Added 9 Docker CVE suppression(s) to .grype.yaml
- Added 22 GHSA ID(s) to audit-ci.jsonc allowlist
- Added 22 npm vulnerability ignore(s) to .grype.yaml
- Updated .nvmrc: 22.22.1 → 24.21.0
- Confidence score: 78%

🤖 Generated with ml-repo-maintenance

Co-Authored-By: ml-repo-maintenance <noreply@mojaloop.org>
@gibaros gibaros added automated ci-config dependencies Pull requests that update a dependency file security Pull requests that address a security vulnerability labels Sep 18, 2026
…ries

The tool left qs 6.15.3, sanitize-html 2.17.6 and joi 17.13.5 in place and
allowlisted 22 GHSA ids in audit-ci.jsonc plus 23 npm ignores in
.grype.yaml. Bump the overrides to 6.16.0 / 2.17.7 and joi to 17.13.8
(latest 17.x; 18 stays held per .ncurc.yaml for hapi-swagger), which clears
npm audit, and drop the allowlist additions. grype 0 Medium+, audit-ci/
dep:check/lint/license/standard-version --dry-run pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated ci-config dependencies Pull requests that update a dependency file security Pull requests that address a security vulnerability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant