Skip to content

refactor(dotcms-models): enable TypeScript strict mode #35934 - #36879

Open
nicobytes wants to merge 3 commits into
mainfrom
issue-35934-strict-dotcms-models
Open

refactor(dotcms-models): enable TypeScript strict mode #35934#36879
nicobytes wants to merge 3 commits into
mainfrom
issue-35934-strict-dotcms-models

Conversation

@nicobytes

Copy link
Copy Markdown
Member

Summary

  • Enable TypeScript strict (and related flags) on dotcms-models without changing tsconfig.base.json.
  • Align DotPageRender / DotPageRenderState optional getters and state fields with real nullability.
  • Fix unknown-block.util index-signature and possibly-undefined access under strict.

Closes #35934

Test plan

  • pnpm exec tsc -p libs/dotcms-models/tsconfig.lib.json --noEmit (0 errors)
  • pnpm nx run dotcms-models:lint
  • CI green on this PR

Made with Cursor

Turn on strict compiler options for the models package and align
optional page-render state types with their actual nullability.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI lite review requested due to automatic review settings August 4, 2026 14:46
@nicobytes
nicobytes requested a review from a team as a code owner August 4, 2026 14:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@mergify

mergify Bot commented Aug 4, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@nicobytes
nicobytes changed the base branch from master to main August 4, 2026 14:48
@nicobytes
nicobytes enabled auto-merge August 4, 2026 15:38
@nicobytes
nicobytes requested a lite review from Copilot August 4, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (2)

core-web/libs/dotcms-models/tsconfig.json:12

  • Issue #35934 acceptance criteria mentions adding dotcms-models src to the typescript-strict-plugin strict paths config, but this PR only enables strict via the library tsconfig. A repo search for typescript-strict-plugin / tsc-strict configuration under core-web/ returned no matches, so it’s unclear that the plugin-based strict rollout requirement is met (or that npx tsc-strict can pass).
        "lib": ["dom", "dom.iterable", "es2022"],
        "forceConsistentCasingInFileNames": true,
        "strict": true,
        "noImplicitOverride": true,
        "noPropertyAccessFromIndexSignature": true,
        "noImplicitReturns": true,
        "noFallthroughCasesInSwitch": true

core-web/libs/dotcms-models/src/lib/dot-rendered-page.model.ts:58

  • containerMap rebuilds a new object on every reduce iteration via object spread ({ ...prev, [curr]: ... }), which is avoidable overhead and can be noticeably slower for pages with many containers. A simple loop (or a typed accumulator) builds the map in-place and keeps typing explicit under strict.
        const containers = this.containers ?? {};

        return Object.keys(containers).reduce(
            (prev, curr) => ({
                ...prev,
                [curr]: containers[curr].container
            }),
            {}
        );

…nder

Replaced the reduce method with a for...of loop for better readability and performance in the containerMap getter. This change enhances code clarity while maintaining the same functionality.
@github-actions github-actions Bot added the Area : Frontend PR changes Angular/TypeScript frontend code label Aug 4, 2026
@claude

claude Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Claude finished @nicobytes's task in 4m 1s —— View job


Code Review: Enable TypeScript strict mode on dotcms-models

  • Read the diff (git diff origin/main...HEAD)
  • Verify nullability changes against underlying interfaces
  • Check containerMap refactor semantics
  • Check unknown-block.util index-signature changes
  • Assess blast radius on strict consumers

The diff is small, focused, and correct. The getter return-type widenings (| undefined) accurately reflect the underlying DotPageRenderParameters interface, where layout?, containers?, template?, and site? are already optional. seoMedia is initialized to null in the constructor, so widening it to string | null matches reality.

New Issues

  • 🟡 Medium: dot-rendered-page.model.ts:49containerMap accesses containers[key].container inside the loop. DotPageContainerStructure values are non-optional ({ container: DotContainer; ... }), so this is safe under strict. Just noting the assumption: Object.keys(containers) guarantees each key exists, so no undefined-access risk. No action needed — verified against the interface at dot-container.model.ts:63.

Correctness notes (verified, not issues)

  • containerMap behavior is preserved — the imperative loop produces the same map as the prior reduce/spread, and the ?? {} guard correctly handles the now-undefined containers. This also resolves Copilot's perf note about per-iteration object spread.
  • unknown-block.util.ts:15 — hoisting type via optional chaining before the typeof === 'string' check is behavior-preserving. The bracket access attributes['originalType'] (L105-106) is required under noPropertyAccessFromIndexSignature since TipTap's attribute param is index-signature typed. Correct.

Blast radius

Widening these public getters to include | undefined is the right modeling, but it shifts the null-handling burden onto consumers. Most consumers live in dotcms-ui (non-strict, strict: false in tsconfig.base.json), so they won't get compile errors — the runtime undefined handling there is unchanged from today's actual behavior. Strict consumers (data-access, etc.) touch only seoMedia (dot-page-state.service.ts:243), which was already effectively nullable. No breakage expected.

Scope check

The Copilot suppressed comment flagged that issue #35934's acceptance criteria mention registering dotcms-models/src in a typescript-strict-plugin paths config, but this PR enables strict via the library tsconfig.json directly instead. That's a valid alternative approach (per-lib tsconfig strict is cleaner than a central plugin allowlist and is the pattern already used by data-access, dotcms, global-store, and the SDK libs). Worth confirming with the issue author that the tsconfig approach satisfies the criteria, but not a code defect.

Verdict: No blocking issues. The PR does exactly what it describes and the type changes are sound. Confirm CI green (the last checkbox in the PR test plan).
· issue-35934-strict-dotcms-models

@semgrep-dotcms

semgrep-dotcms Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Semgrep found 1 console-log-express finding:

  • core-web/libs/sdk/client/src/lib/utils/sdk-compatibility.ts

Detected a logger that logs user input without properly neutralizing the output. The log message could contain characters like and and cause an attacker to forge log entries or include malicious content into the logs. Use proper input validation and/or output encoding to prevent log entries from being forged.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>core-web/libs/sdk/client/src/lib/utils/sdk-compatibility.ts</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/libs/sdk/client/src/lib/utils/sdk-compatibility.ts#L80 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 80] headers</a>"]
        end
        %% Intermediate

        subgraph Traces0[Traces]
            direction TB

            v2["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/libs/sdk/client/src/lib/utils/sdk-compatibility.ts#L80 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 80] serverVersion</a>"]

            v3["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/libs/sdk/client/src/lib/utils/sdk-compatibility.ts#L90 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 90] `</a>"]
        end
            v2 --> v3
        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/libs/sdk/client/src/lib/utils/sdk-compatibility.ts#L89 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 89] console.error(<br>                `[dotCMS SDK] SDK ${ownVersion} is not supported by dotCMS ${serverVersion} ` +<br>                    `(minimum required: ${minSdkVersion}). Upgrade required: ` +<br>                    &apos;https://www.dotcms.com/docs/latest/sdk-version-compatibility&apos;<br>            )</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    Traces0:::invis
    File0:::invis

    %% Connections

    Source --> Traces0
    Traces0 --> Sink

Loading

Semgrep found 373 CUSTOM_INJECTION-2 findings:

The method identified is susceptible to injection. The input should be validated and properly
escaped.

Semgrep found 110 github-actions-mutable-action-tag findings:

GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608.

Semgrep found 1 gha-workflow-env-secret finding:

  • .github/workflows/cicd_manual_publish-starter.yml

A secret is exposed in the workflow-level env: block, making it available to every job and step in this workflow — including any untrusted code run in pull-request workflows. Scope secrets as narrowly as possible: prefer step-level env: so the secret is only available where it is actually needed.

Semgrep found 1 skill-excessive-autonomy finding:

  • .claude/skills/dotcms-github-issues/SKILL.md

Skill instructs the agent to act autonomously without user confirmation, approval, or oversight. Excessive autonomy directives suppress the human-in-the-loop checkpoints that prevent unintended or malicious actions. In legitimate automation skills, user confirmation should be scoped narrowly; blanket directives to "act without asking" are a common pattern in malicious skills that aim to execute payloads silently. Review the full skill context.

Semgrep found 1 npm-missing-minimum-release-age finding:

This .npmrc does not set a minimum release age or sets it too low. Newly published packages can be malicious or unstable. Add min-release-age = 7 to wait 7 days before resolving newly published package versions. Added in: v11.10 Reference: https://github.blog/changelog/2026-02-18-npm-bulk-trusted-publishing-config-and-script-security-now-generally-available/

Semgrep found 1 hooks-unquoted-variable-bash-eval finding:

  • docker/docker-compose-examples/experiments/start-experiments.sh

Use of eval in a Claude Code or Cursor hook script is dangerous. The eval command re-parses its arguments, which can lead to command injection if any variable contains special characters or attacker-controlled data. Avoid eval entirely; use arrays, direct command invocation, or other safe alternatives.

Semgrep found 1 hooks-relative-script-path-bash finding:

  • docker/docker-compose-examples/lgtm-observability/run-prometheus-custom.sh

Relative path used for script invocation in hook. Use absolute paths or environment variables like $CLAUDE_PROJECT_DIR, $CURSOR_PROJECT_DIR, or $HOME to ensure the correct script is executed regardless of working directory.

Semgrep found 6 github-script-injection findings:

Using variable interpolation ${{...}} with github context data in a actions/github-script's script: step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. github context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with env: to store the data and use the environment variable in the run: script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".

Semgrep found 1 gha-curl-pipe-shell finding:

  • .github/actions/core-cicd/setup-java/action.yml

A run: step pipes the output of curl or wget directly into a shell interpreter. This is the "curl | bash" install pattern — if the remote server is compromised or the URL is hijacked, an attacker can execute arbitrary code in your CI runner. Consider downloading the file first, verifying its checksum or signature, and then executing it.

Semgrep found 1 request-url-express finding:

  • core-web/apps/dotcms-ui-e2e/src/requests/pages.ts

Untrusted input might be used to build an HTTP request, which can lead to a Server-side request forgery (SSRF) vulnerability. SSRF allows an attacker to send crafted requests from the server side to other internal or external systems. SSRF can lead to unauthorized access to sensitive data and, in some cases, allow the attacker to control applications or systems that trust the vulnerable service. To prevent this vulnerability, avoid allowing user input to craft the base request. Instead, treat it as part of the path or query parameter and encode it appropriately. When user input is necessary to prepare the HTTP request, perform strict input validation. Additionally, whenever possible, use allowlists to only interact with expected, trusted domains.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>core-web/apps/dotcms-ui-e2e/src/requests/pages.ts</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L76 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 76] request</a>"]
        end
        %% Intermediate

        subgraph Traces0[Traces]
            direction TB

            v2["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L82 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 82] responseData</a>"]

            v3["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L82 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 82] await</a>"]

            v4["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L76 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 76] response</a>"]

            v5["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L76 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 76] await</a>"]

            v6["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L92 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 92] getActionsByContentlet</a>"]

            v7["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L92 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 92] await</a>"]

            v8["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L92 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 92] actions</a>"]

            v9["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L93 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 93] action</a>"]

            v10["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L95 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 95] executeAction</a>"]

            v11["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L58 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 58] actionId</a>"]

            v12["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L59 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 59] endpoint</a>"]
        end
            v2 --> v3
            v3 --> v4
            v4 --> v5
            v5 --> v6
            v6 --> v7
            v7 --> v8
            v8 --> v9
            v9 --> v10
            v10 --> v11
            v11 --> v12
        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/core-web/apps/dotcms-ui-e2e/src/requests/pages.ts#L60 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 60] endpoint</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    Traces0:::invis
    File0:::invis

    %% Connections

    Source --> Traces0
    Traces0 --> Sink

Loading

Semgrep found 1 detect-vercelai finding:

  • core-web/apps/ai-evals/src/harness.ts

Found usage of Vercel's AI product.

Semgrep found 1 spring-tainted-path-traversal finding:

  • dotCMS/src/main/java/com/dotcms/rest/ContentResource.java

The application builds a file path from potentially untrusted data, which can lead to a path traversal vulnerability. An attacker can manipulate the path which the application uses to access files. If the application does not validate user input and sanitize file paths, sensitive files such as configuration or user data can be accessed, potentially creating or overwriting files. To prevent this vulnerability, validate and sanitize any input that is used to create references to file paths. Also, enforce strict file access controls. For example, choose privileges allowing public-facing applications to access only the required files. In Java, you may also consider using a utility method such as org.apache.commons.io.FilenameUtils.getName(...) to only retrieve the file name from the path.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>dotCMS/src/main/java/com/dotcms/rest/ContentResource.java</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1424 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1424] multipart</a>"]
        end
        %% Intermediate

        subgraph Traces0[Traces]
            direction TB

            v2["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1424 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1424] multipart</a>"]

            v3["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1428 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1428] multipartPUTandPOST</a>"]

            v4["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1484 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1484] multipart</a>"]

            v5["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1499 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1499] part</a>"]

            v6["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1499 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1499] part</a>"]

            v7["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1581 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1581] processFile</a>"]

            v8["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1613 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1613] part</a>"]

            v9["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1616 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1616] badFileName</a>"]

            v10["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1617 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1617] filename</a>"]
        end
            v2 --> v3
            v3 --> v4
            v4 --> v5
            v5 --> v6
            v6 --> v7
            v7 --> v8
            v8 --> v9
            v9 --> v10
        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1632 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1632] tmpFolder.getAbsolutePath() + File.separator + filename</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    Traces0:::invis
    File0:::invis

    %% Connections

    Source --> Traces0
    Traces0 --> Sink

Loading

Semgrep found 1 tainted-file-path finding:

Detected user input controlling a file path. An attacker could control the location of this file, to include going backwards in the directory with '../'. To address this, ensure that user-controlled variables in file paths are sanitized. You may also consider using a utility method such as org.apache.commons.io.FilenameUtils.getName(...) to only retrieve the file name from the path.

View Dataflow Graph
flowchart LR
    classDef invis fill:white, stroke: none
    classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none

    subgraph File0["<b>dotCMS/src/main/java/com/dotcms/rest/ContentResource.java</b>"]
        direction LR
        %% Source

        subgraph Source
            direction LR

            v0["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1424 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1424] multipart</a>"]
        end
        %% Intermediate

        subgraph Traces0[Traces]
            direction TB

            v2["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1424 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1424] multipart</a>"]

            v3["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1428 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1428] multipartPUTandPOST</a>"]

            v4["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1484 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1484] multipart</a>"]

            v5["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1499 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1499] part</a>"]

            v6["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1499 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1499] part</a>"]

            v7["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1581 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1581] processFile</a>"]

            v8["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1613 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1613] part</a>"]

            v9["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1616 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1616] badFileName</a>"]

            v10["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1617 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1617] filename</a>"]
        end
            v2 --> v3
            v3 --> v4
            v4 --> v5
            v5 --> v6
            v6 --> v7
            v7 --> v8
            v8 --> v9
            v9 --> v10
        %% Sink

        subgraph Sink
            direction LR

            v1["<a href=https://github.com/dotCMS/core/blob/bc808432101fcd25e530e89099a459d6982a0419/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1631 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1631] new File(<br>                    tmpFolder.getAbsolutePath() + File.separator + filename)</a>"]
        end
    end
    %% Class Assignment
    Source:::invis
    Sink:::invis

    Traces0:::invis
    File0:::invis

    %% Connections

    Source --> Traces0
    Traces0 --> Sink

Loading

Semgrep found 1 jsp-scriptlet-xss finding:

  • dotCMS/src/main/webapp/html/portlet/ext/contentlet/edit_contentlet_basic_properties.jsp

Detected request.getParameter(...) used directly inside a JSP expression scriptlet (<%= ... %>). This writes the raw, user-controlled value into the HTTP response without HTML encoding, enabling reflected Cross-Site Scripting (XSS). Wrap the value with an encoding function such as ESAPI.encoder().encodeForHTML(...), Encode.forHtml(...) (OWASP Java Encoder), or HtmlUtils.htmlEscape(...) (Spring) before output.

Semgrep found 3 hooks-dns-exfiltration-generic findings:

DNS lookup command uses a variable in the hostname, which could exfiltrate sensitive data via DNS queries. In Claude Code and Cursor hooks, this pattern can leak secrets or environment data to attacker-controlled domains. Use static hostnames only in DNS commands.

@semgrep-dotcms

semgrep-dotcms Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Semgrep found 2 ssc-90df8fd1-2d4f-4e7b-a8aa-dfa15f51f5bf findings:

Risk: Affected versions of esbuild are vulnerable to Origin Validation Error. esbuild's development server responds to every request, including Server-Sent Events connections, with Access-Control-Allow-Origin: *. Any website a developer visits can therefore make cross-origin requests to the local dev server and read the responses, leaking bundled source code, source maps, and served file paths. Starting the dev server via serve() reaches the vulnerable code path.

Manual Review Advice: A vulnerability from this advisory is reachable if you run esbuild with the --serve flag to start the development server

Fix: Upgrade this library to at least version 0.25.0 at core/core-web/pnpm-lock.yaml:9344.

Reference(s): GHSA-67mh-4wv8-2f99

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-ace67ff4-0843-40f4-a8d3-13e050943589 finding:

Risk: Affected versions of js-yaml are vulnerable to Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'). js-yaml is vulnerable to prototype pollution through its YAML merge key (<<) handling. When parsing untrusted YAML with load, loadAll, safeLoad, or safeLoadAll, a crafted document containing a __proto__ key inside a merged mapping can modify the prototype of the resulting object, leading to integrity violations in the application.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using js-yaml on the CLI

Fix: Upgrade this library to at least version 4.1.1 at core/starter/nextjs/package-lock.json:3161.

Reference(s): GHSA-mh29-5h37-fv8m, CVE-2025-64718

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-f748ff04-95cd-4e1a-8429-2525a723a048 finding:

Risk: Affected versions of webpack are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). webpack's AutoPublicPathRuntimeModule emits runtime code that derives the asset public path from document.currentScript. Because document.currentScript can be DOM-clobbered by an injected scriptless element (e.g. ), an attacker who can inject markup into the page can redirect dynamic chunk/asset loading to an attacker-controlled origin, resulting in cross-site scripting (XSS).

Manual Review Advice: A vulnerability from this advisory is reachable if you build with output.publicPath unset

Fix: Upgrade this library to at least version 5.94.0 at core/core-web/pnpm-lock.yaml:15048.

Reference(s): GHSA-4vvj-4cpr-p986, CVE-2024-43788

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-3e1ecbe7-8bda-4e4e-9998-2b480eb17f61 findings:

Risk: Affected versions of next are vulnerable to Improper Input Validation. Next.js Image Optimization (/_next/image) is affected by two related vulnerabilities fixed together. First, regardless of configuration, the image optimizer forwarded all inbound request headers — including cookies and authentication tokens — to internal API routes when proxying relative image URLs (e.g. /_next/image? url=/api/private-endpoint), allowing an attacker to make authenticated requests to internal endpoints through the public image optimizer. Second, if images.domains or images.remotePatterns is configured, an attacker who controls an allowed external image server can serve non-image content that bypasses magic-number content-type detection; Next.js falls back to the upstream Content-Type header and serves the arbitrary payload as a file download under the trusted application domain — enabling phishing, drive-by downloads, or malicious file delivery.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using next/image and either images.domains or images.remotePatterns

Fix: Upgrade this library to at least version 14.2.31 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-xv57-4mr9-wg8v, CVE-2025-55173

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-5b8294b2-80de-422c-9ed7-4411356927e1 findings:

Risk: Affected versions of next are vulnerable to Allocation of Resources Without Limits or Throttling. An attacker can send a Server Action request with an abruptly closed connection or invalid Content-Length header, causing the internal React Flight Reply decoder to create perpetually-pending promise chunks that never resolve. This leaves the server connection hanging indefinitely until the hosting provider times out execution, resulting in a denial of service.

Manual Review Advice: A vulnerability from this advisory is reachable if you use Server Actions ("use server") without enforcing request timeouts or connection termination

Fix: Upgrade this library to at least version 14.2.21 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-7m27-7ghc-44w9, CVE-2024-56332

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-230a1643-fcad-4f4d-99c7-d9f2709c963e finding:

Risk: Affected versions of next are vulnerable to Uncontrolled Recursion. An attacker can send a crafted HTTP request to the built-in Next.js image optimization endpoint (/_next/image) with a URL-encoded or absolute self-referential url parameter that bypasses the recursion guard, causing the server to recursively optimize images until CPU is exhausted, resulting in a Denial of Service.

Manual Review Advice: A vulnerability from this advisory is reachable if you have default image optimization configured on non Vercel hosting

Fix: Upgrade this library to at least version 14.2.7 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-g77x-44xx-532m, CVE-2024-47831

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-7ea247e6-31af-4d7a-9ff9-d6ad5a08663a finding:

Risk: Affected versions of next are vulnerable to Improper Input Validation. Next.js Image Optimization (/_next/image) is affected by two related vulnerabilities fixed together. First, regardless of configuration, the image optimizer forwarded all inbound request headers — including cookies and authentication tokens — to internal API routes when proxying relative image URLs (e.g. /_next/image? url=/api/private-endpoint), allowing an attacker to make authenticated requests to internal endpoints through the public image optimizer. Second, if images.domains or images.remotePatterns is configured, an attacker who controls an allowed external image server can serve non-image content that bypasses magic-number content-type detection; Next.js falls back to the upstream Content-Type header and serves the arbitrary payload as a file download under the trusted application domain — enabling phishing, drive-by downloads, or malicious file delivery.

Fix: Upgrade this library to at least version 14.2.31 at core/starter/nextjs/package-lock.json:3428.

Reference(s): GHSA-xv57-4mr9-wg8v, CVE-2025-55173

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-4e14615a-6249-41cc-9d46-4fbacf10326e findings:

Risk: Affected versions of next are vulnerable to Server-Side Request Forgery (SSRF). This Next.js config defines a rewrites()/redirects() rule whose destination builds an external hostname from a dynamic :param segment. Because the segment is not constrained to hostname-safe characters, an attacker can inject a value (e.g. containing a dot) that escapes the intended hostname suffix, causing Next.js to proxy the request server-side to an arbitrary host (SSRF) or redirect the client to an attacker-controlled destination (open redirect). Constrain each dynamic segment used in a destination hostname to hostname-safe characters (e.g. [a-z0-9-]+), or upgrade Next.js.

Manual Review Advice: A vulnerability from this advisory is reachable if you define a rewrites() or redirects() rule in next.config.js whose destination hostname is assembled from a dynamic :param segment

Fix: Upgrade this library to at least version 15.5.21 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-p9j2-gv94-2wf4

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-7c41f8ea-2b9d-4e63-9a17-5d0c8f3b6e42 findings:

Risk: Affected versions of next are vulnerable to Excessive Iteration. Next.js App Router validates multi-page-application (MPA) form submissions by iterating over every $ACTION_REF_-prefixed form field without an upper bound, decoding a bound-argument descriptor for each one. An attacker can POST a form containing a large number of these fields, forcing excessive CPU usage that blocks processing of further requests in the same process, resulting in a denial of service. Declaring any Server Action ("use server") registers it in the server module map and arms this handler.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using the App Router with at least one Server Action

Fix: Upgrade this library to at least version 15.5.21 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-m99w-x7hq-7vfj

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 3 ssc-b5be3fd7-c1fb-4156-b16f-2fc35cb62b00 findings:

  • .github/scripts/release-qa-status/package-lock.json
  • starter/nextjs/package-lock.json
  • .github/scripts/gather-release-data/package-lock.json

Risk: Affected versions of js-yaml are vulnerable to Inefficient Algorithmic Complexity / Uncontrolled Resource Consumption. An attacker can supply a YAML document containing a chain of mappings that each merge the previous one via the merge key (<<), causing js-yaml to spend quadratic CPU time while parsing input whose size grows only linearly, resulting in a denial of service.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using js-yaml on the CLI

Fix: Upgrade this library to at least version 3.15.0 at core/.github/scripts/release-qa-status/package-lock.json:3105.

Reference(s): GHSA-52cp-r559-cp3m, CVE-2026-59869

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-c8b7a1f2-4d36-4f0a-9e2b-1a5c8d7e6f30 finding:

Risk: Affected versions of vite and vite-plus are vulnerable to Exposure of Sensitive Information to an Unauthorized Actor / Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). Vite's server.fs.deny blocklist—which protects sensitive files such as .env and certificate files from being served—can be bypassed on Windows using alternate path representations (NTFS Alternate Data Stream syntax like /.env::$DATA?raw, or 8.3 short filenames), allowing an attacker to read otherwise-denied files when the dev server is exposed to the network.

Manual Review Advice: A vulnerability from this advisory is reachable if you expose the Vite dev server or vite-plus to the network by configuring a non-loopback address using the --host CLI flag on Windows

Fix: Upgrade this library to at least version 7.3.5 at core/core-web/pnpm-lock.yaml:14756.

Reference(s): GHSA-fx2h-pf6j-xcff, CVE-2026-53571

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-b1111744-f54b-4966-b3a9-9dfcb0019bac finding:

Risk: Affected versions of axios are vulnerable to Inefficient Regular Expression Complexity / Uncontrolled Resource Consumption. axios is vulnerable to a regular expression denial of service (ReDoS). The internal cookies.read() helper in lib/helpers/cookies.js builds a regular expression by concatenating the cookie name directly into the pattern without escaping regex metacharacters. When the cookie name flowing into the XSRF cookie read (e.g. via xsrfCookieName) contains a catastrophic-backtracking payload, evaluating the regex against document.cookie can freeze the JavaScript event loop, causing a denial of service in the browser tab or in Node.js/SSR applications. The affected code path is reached during ordinary axios request processing, so any importer of an affected version is exposed. Upgrade to a patched version (0.32.0 or 1.16.0), or set xsrfCookieName: null to disable XSRF cookie reading.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using axios in browser with untrusted xsrfCookieName value

Fix: Upgrade this library to at least version 1.16.0 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-hfxv-24rg-xrqf

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-48d90ae5-e075-4c25-9ae0-d42f5bddc4bf finding:

Risk: Affected versions of axios are vulnerable to Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') / Unintended Proxy or Intermediary ('Confused Deputy'). axios reads config.proxy via prototype-chain property access, so any Object.prototype pollution elsewhere in the dependency tree silently routes all HTTP requests through an attacker-controlled proxy, yielding a full man-in-the-middle. The vulnerability fires on ordinary axios usage with no specific API call or configuration required; upgrade to axios 1.16.0 or later.

Manual Review Advice: A vulnerability from this advisory is reachable if you use axios to make HTTP requests

Fix: Upgrade this library to at least version 1.16.0 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-35jp-ww65-95wh, GHSA-fvcv-3m26-pcqx, CVE-2026-44494

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-32ffb194-64c6-4f38-85ba-9a400470a6e3 findings:

Risk: Affected versions of next are vulnerable to Allocation of Resources Without Limits or Throttling. An attacker can send a specially crafted HTTP request to any Next.js App Router Server Function endpoint that, when deserialized by the underlying React Server Components (Flight) runtime, triggers excessive CPU usage—exhausting the server process and resulting in a denial-of-service. The vulnerable deserialization path is part of the App Router's HTTP route handler, so any Next.js application that uses the App Router is reachable without any explicit Server Action declared in user code.

Manual Review Advice: A vulnerability from this advisory is reachable if you are using the App Router

Fix: Upgrade this library to at least version 15.5.16 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-8h8q-6873-q5fj, CVE-2026-23870

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-6bbb4d45-83de-4087-b832-29537bbc28a1 findings:

Risk: Affected versions of next are vulnerable to Server-Side Request Forgery (SSRF). Next.js's standalone router-server forwards WebSocket Upgrade requests to whatever host and port the attacker supplies in an absolute-URL request-line or Host header, because the upgrade handler in packages/next/src/server/lib/router-server.ts invokes proxyRequest(...) whenever parsedUrl.protocol is set, without the finished/statusCode guards that protect normal HTTP requests. An unauthenticated attacker can therefore make a self-hosted Next.js process open an outbound TCP connection to arbitrary internal or external destinations (e.g. cloud metadata endpoints such as 169.254.169.254, internal Redis/Elasticsearch/Kubelet, etc.), enabling SSRF and potential cloud credential theft. Upgrade to next@15.5.16 or next@16.2.5.

Manual Review Advice: A vulnerability from this advisory is reachable if you self-host Next.js application instead of Vercel-hosted deployments

Fix: Upgrade this library to at least version 15.5.16 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-c4j6-fc7j-m34r, CVE-2026-44578

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-6efe528b-deef-ace9-810a-467438938c20 findings:

Risk: Affected versions of next are vulnerable to Allocation of Resources Without Limits or Throttling. A specially crafted HTTP request to a Next.js App Router Server Function endpoint can trigger excessive CPU consumption during React Server Components deserialization, leading to denial of service.

Fix: Upgrade this library to at least version 15.5.15 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-q4gf-8mx6-v5v3

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-7655e34f-47d3-43f6-b687-32e02f3c8005 findings:

  • dotcms-postman/pnpm-lock.yaml
  • .github/scripts/gather-release-data/package-lock.json

Risk: Affected versions of handlebars are vulnerable to Improper Control of Generation of Code ('Code Injection') / Improper Encoding or Escaping of Output / Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). The Handlebars CLI precompiler allows arbitrary JavaScript injection by embedding unescaped template filenames and CLI option values such as --namespace, --commonjs, and --handlebarPath directly into generated output. An attacker who can control these inputs can cause malicious code to execute when the precompiled bundle is loaded in Node.js or a browser.

Manual Review Advice: A vulnerability from this advisory is reachable if you execute templates through the Handlebars CLI precompiler

Fix: Upgrade this library to at least version 4.7.9 at core/dotcms-postman/pnpm-lock.yaml:197.

Reference(s): GHSA-xjpj-3mr7-gcpf, CVE-2026-33941

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-6193c409-cebc-449c-8a55-f95fa9d0e4f0 finding:

Risk: Affected versions of rollup are vulnerable to Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). Rollup is vulnerable to arbitrary file write via path traversal: chunk/asset names derived from user-controlled inputs (e.g., CLI named inputs, manual chunk aliases, or malicious plugins) are insufficiently sanitized, allowing ../ sequences to survive and be passed into path.resolve when computing output paths. This lets an attacker escape the configured output directory and overwrite arbitrary files on the host filesystem that the build process can write to, potentially leading to persistent RCE by clobbering shell/profile or other executable/config files.

Manual Review Advice: A vulnerability from this advisory is reachable if you are running rollup --input

Fix: Upgrade this library to at least version 4.59.0 at core/core-web/pnpm-lock.yaml:13456.

Reference(s): GHSA-mw96-cpmx-2vgc, CVE-2026-27606

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-d1b4e9e7-4dae-4218-8bb1-046e9a0b7e60 findings:

Risk: Affected versions of next are vulnerable to Deserialization of Untrusted Data / Uncontrolled Resource Consumption. A flaw in React Server Components' deserialization allows an attacker to send a specially crafted HTTP request to any App Router Server Function endpoint in Next.js, triggering excessive CPU usage, out-of-memory conditions, or a server crash and resulting in a denial of service.

Fix: Upgrade this library to at least version 15.0.8 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-h25m-26qc-wcjf, CVE-2026-23864

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-b94a740c-3b13-43fd-9f2d-4d8bb0fe0b69 findings:

Risk: Affected versions of next are vulnerable to Dependency on Vulnerable Third-Party Component / Deserialization of Untrusted Data / Uncontrolled Resource Consumption. An attacker can send a specially crafted HTTP request to any Server Function endpoint (as used by Next.js' App Router) that, when deserialized by the React Server Components runtime, enters an infinite loop—hanging the server process, exhausting CPU, and resulting in a denial-of-service.

Fix: Upgrade this library to at least version 14.2.35 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-5j59-xgg2-r9c4, CVE-2025-67779

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 2 ssc-74b4cbd5-76e9-40fe-adb6-38be9f569d24 findings:

Risk: Affected versions of next are vulnerable to Dependency on Vulnerable Third-Party Component / Deserialization of Untrusted Data / Uncontrolled Resource Consumption. A flaw in Next.js's App Router deserialization allows an attacker to send a specially crafted HTTP request body that, when parsed by the server, triggers excessive CPU work or an infinite loop. By targeting any App Router endpoint with this malicious payload, the server process can hang and become unresponsive, resulting in a denial-of-service.

Fix: Upgrade this library to at least version 14.2.34 at core/core-web/pnpm-lock.yaml:11820.

Reference(s): GHSA-mwv6-3258-q52c

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-cee3e6d5-d7c8-4c35-9815-076aa1ebfd49 finding:

Risk: Affected versions of rollup are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

Manual Review Advice: A vulnerability from this advisory is reachable if you use Rollup to bundle JavaScript with import.meta.url and the output format is set to cjs, umd, or iife formats, while allowing users to inject scriptless HTML elements with unsanitized name attributes

Fix: Upgrade this library to at least version 4.22.4 at core/core-web/pnpm-lock.yaml:13456.

Reference(s): GHSA-gcx4-mw62-g8wm, CVE-2024-47068

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-7dd7535a-bf1d-4a2a-8d67-c4c29cf693be finding:

  • core-web/libs/sdk/create-app/src/utils/index.ts

Risk: Affected versions of axios are vulnerable to Insertion of Sensitive Information Into Sent Data. The Node.js HTTP adapter in axios fails to clear the Proxy-Authorization header when a request that initially used an authenticated HTTP proxy is redirected to a target requiring no proxy (e.g. an HTTP-to-HTTPS redirect with no HTTPS proxy configured), leaking the proxy credentials to the final origin server.

Manual Review Advice: A vulnerability from this advisory is reachable if you make requests with the Node.js HTTP adapter through an authenticated HTTP proxy with redirect following enabled

Fix: Upgrade this library to at least version 1.16.0 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-p92q-9vqr-4j8v, CVE-2026-44487

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-d8334024-f7b2-46ef-8644-adcdebb058c3 finding:

  • core-web/libs/sdk/create-app/src/utils/index.ts

Risk: Affected versions of axios are vulnerable to Exposure of Sensitive Information to an Unauthorized Actor. The Node.js HTTP adapter in axios leaks authenticated proxy credentials when following redirects. When a request traverses an authenticated proxy and is then redirected to a URL that no longer routes through that proxy, the stale Proxy-Authorization header persists on the redirected request and is exposed to the (potentially attacker-controlled) redirect target, disclosing the proxy username and password. Upgrade to axios >= 1.16.0 or >= 0.32.0.

Manual Review Advice: A vulnerability from this advisory is reachable if you use axios in Node.js with an authenticated proxy configured via the proxy request or instance config option, or via the HTTP_PROXY/HTTPS_PROXY environment variables

Fix: Upgrade this library to at least version 1.16.0 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-j5f8-grm9-p9fc, CVE-2026-44486

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-b3dae150-a0f3-42d9-9b5a-121eb4330524 finding:

  • core-web/libs/sdk/create-app/src/utils/index.ts

Risk: Affected versions of axios are vulnerable to Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') / Unintended Proxy or Intermediary ('Confused Deputy'). axios reads config.proxy via prototype-chain property access, so any Object.prototype pollution elsewhere in the dependency tree silently routes all HTTP requests through an attacker-controlled proxy, yielding a full man-in-the-middle. The vulnerability fires on ordinary axios usage with no specific API call or configuration required; upgrade to axios 1.16.0 or later.

Fix: Upgrade this library to at least version 1.16.0 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-35jp-ww65-95wh, GHSA-fvcv-3m26-pcqx, CVE-2026-44494

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-cc89d850-fe0d-4017-bd56-94cb42248142 finding:

  • core-web/libs/sdk/create-app/src/utils/index.ts

Risk: Affected versions of axios are vulnerable to Improper Control of Generation of Code ('Code Injection') / Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'). axios contains a prototype-pollution gadget in its config merge pipeline. If Object.prototype.transformResponse is polluted by a separate vulnerability in the same process, mergeConfig() reads it through the prototype chain and transformData() executes the inherited function on every HTTP response body, enabling credential theft and response hijacking. Every axios HTTP call traverses this pipeline. Upgrade to 0.31.1, 1.15.2, or later.

Fix: Upgrade this library to at least version 1.15.2 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-3g43-6gmg-66jw, CVE-2026-44495

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-79676c2c-3b3e-4d9a-8d60-79fbeed0c37b finding:

  • core-web/libs/sdk/create-app/src/utils/index.ts

Risk: Affected versions of axios are vulnerable to Authentication Bypass by Alternate Name / Server-Side Request Forgery (SSRF). Axios does not normalize IPv4-mapped IPv6 addresses before applying NO_PROXY, so a request whose host is given in IPv4-mapped IPv6 notation (e.g. ::ffff:7f00:1 or ::ffff:a9fe:a9fe) is not matched against the IPv4 entries in NO_PROXY (e.g. 127.0.0.1 or 169.254.169.254) and is sent through the configured proxy instead of bypassing it. If an attacker can influence request URLs, they may force internal/loopback Axios traffic through a configured proxy, undermining SSRF protections and exposing sensitive responses such as cloud metadata. This is an incomplete fix for CVE-2025-62718.

Manual Review Advice: A vulnerability from this advisory is reachable if you have a proxy configured via HTTP_PROXY/HTTPS_PROXY and an IPv4 address listed in NO_PROXY

Fix: Upgrade this library to at least version 1.16.0 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-pjwm-pj3p-43mv, CVE-2025-62718, CVE-2026-44492

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-502ed9ad-fab6-4fe6-8236-a1b300c72e40 finding:

  • core-web/libs/sdk/create-app/src/utils/index.ts

Risk: Affected versions of axios are vulnerable to Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'). An attacker can exploit this vulnerability by polluting Object.prototype via another dependency in the same Node.js process. Axios reads five HTTP adapter config properties (auth, baseURL, socketPath, beforeRedirect, insecureHTTPParser) via direct property access without hasOwnProperty guards, so the polluted values are silently picked up on every outbound HTTP request. This enables Authorization header credential injection, request hijacking via baseURL redirection, SSRF to internal Unix sockets, attacker-controlled callback execution during redirects, and request smuggling via the insecure HTTP parser.

Fix: Upgrade this library to at least version 1.15.2 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-q8qp-cvcw-x6jj, CVE-2026-42264

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-5f713042-7303-4a02-a5b0-d9f782c56ab6 finding:

  • core-web/libs/sdk/create-app/src/utils/index.ts

Risk: Affected versions of axios are vulnerable to Permissive List of Allowed Inputs / Server-Side Request Forgery (SSRF) / Unintended Proxy or Intermediary ('Confused Deputy'). Axios contains an incomplete fix for CVE-2025-62718. The internal isLoopback() helper in lib/helpers/shouldBypassProxy.js recognizes only 127.0.0.1, localhost, and ::1 as loopback addresses, instead of the entire 127.0.0.0/8 subnet defined by RFC 1122 §3.2.1.3. Any Node-side Axios request whose target host falls in 127.0.0.0/8 but is not literally 127.0.0.1 (e.g., 127.0.0.2, 127.1.2.3) is silently routed through the configured HTTP_PROXY/HTTPS_PROXY even when NO_PROXY is set to exempt loopback. This enables SSRF, exposes internal/loopback-bound services (e.g., sidecars, metrics agents, vault helpers listening on 127.0.0.X), and may leak request headers, credentials, and bodies to a proxy intermediary.

Manual Review Advice: A vulnerability from this advisory is reachable if you use Axios in Node.js with a proxy configured via the HTTP_PROXY/HTTPS_PROXY environment variables or the proxy request/instance config option, and NO_PROXY is set to exempt loopback addresses

Fix: Upgrade this library to at least version 1.15.1 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-pmwg-cvhr-8vh7, CVE-2026-42043

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-2a506dbb-3601-436d-bfc2-9fc4045c8f4f finding:

  • core-web/libs/sdk/create-app/src/utils/index.ts

Risk: Affected versions of axios are vulnerable to Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'). Axios do not guard reads of config properties (e.g. parseReviver, transport, transformRequest, transformResponse) with hasOwnProperty checks. If Object.prototype is polluted by any co-dependency in the same Node.js process, an attacker can install gadgets that silently tamper with and exfiltrate JSON response bodies, or fully hijack the underlying HTTP transport to capture request URLs, headers, and basic-auth credentials.

Fix: Upgrade this library to at least version 1.15.1 at core/core-web/pnpm-lock.yaml:7832.

Reference(s): GHSA-pf86-5x62-jrwf, CVE-2026-42033

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-c45b5a59-f3fa-45d7-b31d-0b048412a07c finding:

Risk: Affected versions of vitest are vulnerable to Missing Authorization. When the Vitest UI server is listening, the deprecated isFileServingAllowed check is applied without normalizing the URL before filesystem operations, allowing path traversal that lets an attacker read, write, and execute arbitrary files outside the project directory.

Manual Review Advice: A vulnerability from this advisory is reachable if you run the Vitest UI on Windows, or you expose the Vitest UI server to the network with the --api.host flag or api.host config option

Fix: Upgrade this library to at least version 4.1.0 at core/core-web/pnpm-lock.yaml:14839.

Reference(s): GHSA-5xrq-8626-4rwp

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

Semgrep found 1 ssc-37ae9e0a-cbf0-4910-8f73-04f2275899a6 finding:

Risk: webpack 5.x before 5.76.0 is vulnerable to Improper Access Control due to ImportParserPlugin.js mishandling the magic comment feature. Due to this, webpack does not avoid cross-realm object access and an attacker who controls a property of an untrusted object can obtain access to the real global object.

Manual Review Advice: A vulnerability from this advisory is reachable if you host an application utilizing webpack and an attacker can control a property of an untrusted object

Fix: Upgrade this library to at least version 5.76.0 at core/core-web/pnpm-lock.yaml:15048.

Reference(s): GHSA-hc6q-2mpp-qw7j, CVE-2023-28154

If this is a critical or high severity finding, please also link this issue in the #security channel in Slack.

@nicobytes
nicobytes added this pull request to the merge queue Aug 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[01/44] Enable TS strict mode in dotcms-models

5 participants