Skip to content

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

Open
sg00dwin wants to merge 2 commits 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 2 commits 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:

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.

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

Assisted by: Claude Code (Opus 4.6)
@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

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: dfaf54a6-cdbf-4267-9659-8cc7d4e348cb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 | ✅ 5 | ❌ 10

❌ Failed checks (10 inconclusive)

Check name Status Explanation Resolution
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 (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the Jira issue and the main fix: pinning form-data to address the CRLF injection CVE.
Description check ✅ Passed The description covers root cause, solution, tests, and additional info, but omits screenshots, test setup details, browser conformance, and reviewers.
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.
✨ 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

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sg00dwin
Once this PR has been reviewed and has the lgtm label, please ask for approval from rhamilto. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@sg00dwin: all tests passed!

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

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants