Skip to content

OCPBUGS-90514: Fix CVE-2026-12143 form-data CRLF injection - #16865

Open
sg00dwin wants to merge 1 commit into
openshift:mainfrom
sg00dwin:OCPBUGS-90514-form-data-crlf-cve
Open

OCPBUGS-90514: Fix CVE-2026-12143 form-data CRLF injection#16865
sg00dwin wants to merge 1 commit into
openshift:mainfrom
sg00dwin:OCPBUGS-90514-form-data-crlf-cve

Conversation

@sg00dwin

@sg00dwin sg00dwin commented Jul 27, 2026

Copy link
Copy Markdown
Member

Pin form-data to patched versions (2.5.6, 4.0.6) via Yarn resolutions to fix Content-Disposition header injection.

Analysis / Root cause:

The form-data npm package (transitive dependency) versions 4.0.5 and 2.5.1 are vulnerable to CRLF injection (CVE-2026-12143). Field names and filenames are concatenated into Content-Disposition headers without escaping CR, LF, or " characters, allowing header injection or multipart part smuggling. Two vulnerable versions are resolved in the lockfile:

form-data@4.0.5 via @cypress/request, @kubernetes/client-node, @types/node-fetch
form-data@2.5.1 via gitlab@10.0.1 (through @console/git-service)

Solution description:

Updates yarn.lock to resolve form-data to patched versions (4.0.6 and 2.5.6). Both patched versions are within the existing semver ranges of all consumers, so no resolutions override is needed — this is a lockfile-only update. The fix escapes CR/LF/" as %0D/%0A/%22 per the WHATWG spec, matching browser behavior. No API changes.

Test cases:

yarn install succeeds
yarn why form-data confirms all 4 consumers resolve to patched versions
yarn test packages/git-service — 9 suites, 123 tests pass
yarn test packages/dev-console — 99 suites, 679 tests pass
yarn build — production build succeeds
yarn test-playwright --project=smoke — 5 tests pass against live OCP cluster
CI passes

Additional info:

CVE: https://nvd.nist.gov/vuln/detail/CVE-2026-12143
Jira: OCPBUGS-90514

Assisted by: Claude Code (Opus 4.6)

Summary by CodeRabbit

  • Chores
    • Updated dependency resolution settings to ensure consistent versions of form-data and protobufjs are used.
    • Improved dependency consistency and compatibility across supported version ranges.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jul 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sg00dwin: This pull request references Jira Issue OCPBUGS-90514, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Pin form-data to patched versions (2.5.6, 4.0.6) via Yarn resolutions to fix Content-Disposition header injection.

Analysis / Root cause:

The form-data npm package (transitive dependency) versions 4.0.5 and 2.5.1 are vulnerable to CRLF injection (CVE-2026-12143). Field names and filenames are concatenated into Content-Disposition headers without escaping CR, LF, or " characters, allowing header injection or multipart part smuggling. Two vulnerable versions are resolved in the lockfile:

form-data@4.0.5 via @cypress/request, @kubernetes/client-node, @types/node-fetch
form-data@2.5.1 via gitlab@10.0.1 (through @console/git-service)

Solution description:

Adds four descriptor-scoped Yarn Berry resolutions to frontend/package.json pinning form-data to patched versions (2.5.6 and 4.0.6). Each resolution targets a specific semver range declared by a different consumer — required because Yarn Berry matches resolutions against exact descriptor strings, not package names. No API changes; the fix escapes CR/LF/" as %0D/%0A/%22 per the WHATWG spec, matching browser behavior.

Test cases:

yarn install succeeds
yarn why form-data confirms all 4 consumers resolve to patched versions
yarn test packages/git-service — 9 suites, 123 tests pass
yarn test packages/dev-console — 99 suites, 679 tests pass
yarn build — production build succeeds
yarn test-playwright --project=smoke — 5 tests pass against live OCP cluster
CI passes

Additional info:

CVE: https://nvd.nist.gov/vuln/detail/CVE-2026-12143
Jira: OCPBUGS-90514

Assisted by: Claude Code (Opus 4.6)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested review from Leo6Leo and fsgreco July 27, 2026 21:16
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The frontend Yarn resolutions retain the existing protobufjs pin and add fixed-version overrides for four form-data semver ranges.

Changes

Frontend dependency resolutions

Layer / File(s) Summary
Form-data resolution overrides
frontend/package.json
Adds form-data resolutions mapping ^2.3.3 to 2.5.6 and the 4.x ranges to 4.0.6, while retaining the protobufjs resolution.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested labels: verified

Suggested reviewers: logonoff, rhamilto, vojtechszocs

🚥 Pre-merge checks | ✅ 4 | ❌ 11

❌ Failed checks (1 warning, 10 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the root cause, tests, and Jira issue, but it incorrectly describes the change as lockfile-only and omits the package.json resolutions. Update the solution description to document the descriptor-scoped Yarn resolutions added in frontend/package.json and align the stated implementation with the actual changes.
Stable And Deterministic Test Names ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Test Structure And Quality ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Microshift Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Single Node Openshift (Sno) Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Topology-Aware Scheduling Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ote Binary Stdout Contract ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Ipv6 And Disconnected Network Test Compatibility ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Weak-Crypto ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Container-Privileges ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
No-Sensitive-Data-In-Logs ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the Jira issue and the form-data CRLF injection fix, which matches the primary change.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@sg00dwin: This pull request references Jira Issue OCPBUGS-90514, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

Pin form-data to patched versions (2.5.6, 4.0.6) via Yarn resolutions to fix Content-Disposition header injection.

Analysis / Root cause:

The form-data npm package (transitive dependency) versions 4.0.5 and 2.5.1 are vulnerable to CRLF injection (CVE-2026-12143). Field names and filenames are concatenated into Content-Disposition headers without escaping CR, LF, or " characters, allowing header injection or multipart part smuggling. Two vulnerable versions are resolved in the lockfile:

form-data@4.0.5 via @cypress/request, @kubernetes/client-node, @types/node-fetch
form-data@2.5.1 via gitlab@10.0.1 (through @console/git-service)

Solution description:

Adds four descriptor-scoped Yarn Berry resolutions to frontend/package.json pinning form-data to patched versions (2.5.6 and 4.0.6). Each resolution targets a specific semver range declared by a different consumer — required because Yarn Berry matches resolutions against exact descriptor strings, not package names. No API changes; the fix escapes CR/LF/" as %0D/%0A/%22 per the WHATWG spec, matching browser behavior.

Test cases:

yarn install succeeds
yarn why form-data confirms all 4 consumers resolve to patched versions
yarn test packages/git-service — 9 suites, 123 tests pass
yarn test packages/dev-console — 99 suites, 679 tests pass
yarn build — production build succeeds
yarn test-playwright --project=smoke — 5 tests pass against live OCP cluster
CI passes

Additional info:

CVE: https://nvd.nist.gov/vuln/detail/CVE-2026-12143
Jira: OCPBUGS-90514

Assisted by: Claude Code (Opus 4.6)

Summary by CodeRabbit

  • Chores
  • Updated dependency resolution settings to ensure consistent versions of form-data and protobufjs are used.
  • Improved dependency consistency and compatibility across supported version ranges.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@sg00dwin

Copy link
Copy Markdown
Member Author

/assign @rhamilto

Comment thread frontend/package.json Outdated
Comment on lines +229 to +232
"form-data@npm:^2.3.3": "2.5.6",
"form-data@npm:^4.0.0": "4.0.6",
"form-data@npm:^4.0.4": "4.0.6",
"form-data@npm:~4.0.4": "4.0.6"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

exact version resolutions should be the responsibility of the lockfile unless otherwise necessary

these are all within the semver range, can we use yarn set resolution? https://yarnpkg.com/cli/set/resolution, to avoid bloating the resolutions block?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

removed the resolutions, lockfile-only now.

  Bump form-data to patched versions (4.0.6, 2.5.6) via lockfile
  update. Both versions are within the existing semver ranges of
  all consumers.

  Assisted by: Claude Code
@sg00dwin
sg00dwin force-pushed the OCPBUGS-90514-form-data-crlf-cve branch from 023f7c3 to 51a83ce Compare July 31, 2026 17:46

@logonoff logonoff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 31, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-gcp-console
/test e2e-playwright

@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, sg00dwin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2026
@sg00dwin

Copy link
Copy Markdown
Member Author

/test backend
/test e2e-gcp-console

@logonoff

Copy link
Copy Markdown
Member

/test all
/verified by ci

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 31, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@logonoff: This PR has been marked as verified by ci.

Details

In response to this:

/test all
/verified by ci

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD ea72ab4 and 2 for PR HEAD 51a83ce in total

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD d934fc2 and 1 for PR HEAD 51a83ce in total

@openshift-ci

openshift-ci Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

@sg00dwin: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-playwright 51a83ce link false /test e2e-playwright
ci/prow/e2e-gcp-console 51a83ce link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants