Skip to content

Upgrade React to v19.0.3 and react-on-rails-rsc to v19.0.4 (CVE-2025-55183, CVE-2025-55184, CVE-2025-67779)#2233

Merged
AbanoubGhadban merged 8 commits intomasterfrom
upgrade-to-react-19.0.3
Dec 16, 2025
Merged

Upgrade React to v19.0.3 and react-on-rails-rsc to v19.0.4 (CVE-2025-55183, CVE-2025-55184, CVE-2025-67779)#2233
AbanoubGhadban merged 8 commits intomasterfrom
upgrade-to-react-19.0.3

Conversation

@AbanoubGhadban
Copy link
Copy Markdown
Collaborator

@AbanoubGhadban AbanoubGhadban commented Dec 16, 2025

Summary

This PR upgrades React and React Server Components to patched versions that fix three critical security vulnerabilities (CVE-2025-55183, CVE-2025-55184, and CVE-2025-67779) in React Server Components.

Security Vulnerabilities Fixed

This upgrade addresses issue #2223:

CVE Vulnerability Severity Fix
CVE-2025-55183 Source Code Exposure CVSS 5.3 (Medium) Server function references now return safe placeholder instead of exposing source code
CVE-2025-55184 Denial of Service (Cyclic Promises) CVSS 7.5 (High) Dual-layer cycle detection prevents infinite loops
CVE-2025-67779 Denial of Service (Incomplete Fix) CVSS 7.5 (High) Complete fix in patched version

Changes

  • React: ^19.0.0^19.0.3 (includes December 11, 2025 security patches)
  • React-DOM: ^19.0.0^19.0.3
  • react-on-rails-rsc: ^19.0.4 (includes PR Consider changing default of rendering to prerender: false #12 fixes with react-server-dom-webpack v19.0.3)
  • Scheduler: 0.25.00.27.0 (transitive from React upgrade)

Testing

  • No vulnerable React versions (19.0.0-19.0.2) remain in lock files
  • All React Server Components security patches verified in bundled dependencies
  • Peer dependency flexibility allows end users to choose compatible versions

Pull Request Checklist

  • Add/update test to cover these changes (existing tests validate RSC functionality)
  • Update documentation (no doc changes needed for dependency upgrade)
  • Update CHANGELOG file (security fixes documented)
  • Security assessment completed (all 3 CVEs mitigated)

Other Information

This PR fully mitigates all React vulnerabilities mentioned in issue #2223. The upgrade is non-breaking and compatible with existing React Server Components implementations.

Summary by CodeRabbit

  • Bug Fixes

    • Resolved critical security vulnerabilities affecting React Server Components
    • Enhanced stability with cycle-detection mechanisms
  • Chores

    • Updated React and React-on-Rails dependencies to latest stable versions

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 16, 2025

Walkthrough

This PR addresses React Server Components security vulnerabilities (CVE-2025-55183, CVE-2025-55184, CVE-2025-67779) by updating React to v19.0.3 and react-on-rails-rsc to v19.0.4 across all package configurations. The changelog documents the fixes including cycle-detection and server reference masking, while dependency ranges are updated consistently.

Changes

Cohort / File(s) Summary
Changelog documentation
CHANGELOG.md
Added "Fixed" section documenting three CVE security vulnerabilities in React Server Components (source code exposure, cyclic promises causing DoS), noting React v19.0.3 and react-on-rails-rsc v19.0.4 fixes with cycle-detection and toString() masking; references issue #2223 and PR #2233.
Root package dependencies
package.json
Updated react, react-dom from ^19.0.0 to ^19.0.3; upgraded react-on-rails-rsc from 19.0.2 to ^19.0.4 to address security vulnerabilities.
Pro package dependencies
packages/react-on-rails-pro/package.json
Updated devDependencies: react and react-dom to ^19.0.3, react-on-rails-rsc to ^19.0.4; relaxed peer dependency constraint for react-on-rails-rsc from fixed "19.0.3" to range ">= 19.0.2 <= 19.2.3".
Test dummy app dependencies
react_on_rails/spec/dummy/package.json
Updated react and react-dom from "19.0.0" to "^19.0.3".
Pro test dummy app dependencies
react_on_rails_pro/spec/dummy/package.json
Updated react and react-dom to ^19.0.3; upgraded react-on-rails-rsc to ^19.0.4.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify version numbers are correct across all four package.json files and align with security fix releases
  • Check peer dependency range (">= 19.0.2 <= 19.2.3") is intentional and appropriate for flexibility
  • Validate changelog entries accurately describe the CVE fixes and reference correct issues/PRs
  • Ensure consistency between root, pro, and dummy app package configurations

Possibly related issues

Possibly related PRs

Suggested labels

bug, review-needed, full-ci

Suggested reviewers

  • justin808
  • alexeyr-ci2

Poem

🐰 A patch hops in with fixes so keen,
Security holes now sealed and clean,
React's verses from 19-0-3 ring true,
Cycles detected, toString anew,
Dependencies dance in harmony's way! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: upgrading React to v19.0.3 and react-on-rails-rsc to v19.0.4, and references the security vulnerabilities being addressed. It aligns perfectly with the changeset's primary objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch upgrade-to-react-19.0.3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 16, 2025

PR Review: Upgrade to [email protected]

Summary Analysis

This PR changes the react-on-rails-rsc dependency from a published npm version (^19.0.3) to a git dependency pointing to the main branch. Important: Despite the PR title "Upgrade to [email protected]", this is actually changing the dependency source, not upgrading React itself.


🚨 Critical Issues

1. Misleading PR Title

  • Title says: "Upgrade to [email protected]"
  • Actual change: Switching from npm package to git dependency
  • Impact: Confusing for reviewers and future developers looking through git history
  • Recommendation: Rename to something like "Switch react-on-rails-rsc to git dependency from main branch"

2. Git Dependencies in Production

Using git dependencies (git+https://...) instead of versioned npm packages has significant implications:

Concerns:

  • ⚠️ Reproducibility: The main branch is mutable - builds could change between installs
  • ⚠️ CI/CD Risk: Future commits to main could break this project without warning
  • ⚠️ Performance: Git dependencies are slower to install than npm packages
  • ⚠️ Debugging: Harder to track which version is actually installed
  • ⚠️ Security: No npm audit support for git dependencies

When git dependencies are acceptable:

  • ✅ Temporary workaround for urgent bugfix not yet published
  • ✅ Testing unreleased features during development
  • ✅ Waiting for upstream package to publish a release

Questions to answer:

  1. Why is this necessary? Is there a critical bug in 19.0.3 that's fixed in main?
  2. Is this temporary? If so, when will we switch back to a versioned release?
  3. Have you tested that the git dependency actually works in all environments?

3. Peer Dependency Version Mismatch

The diff shows the git version of react-on-rails-rsc has updated peer dependencies:

  • Before: react: ^19.0.1, react-dom: ^19.0.1
  • After: react: ^19.0.3, react-dom: ^19.0.3

Current state in this repo:

  • packages/react-on-rails-pro/package.json has react: ^19.0.1
  • The lockfile shows [email protected] is actually installed

Impact:

  • This creates a peer dependency mismatch warning
  • While pnpm will still install it, this could cause issues for end users

📋 Missing Checklist Items

According to the PR template, you need to:

  • Add/update tests - Have you tested that the git dependency works?
  • Update documentation - Should document why we're using git dependency
  • Update CHANGELOG - This change should be documented

From CLAUDE.md:

  • Update CHANGELOG.md for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements)
  • Format: [PR 1818](https://github.com/shakacode/react_on_rails/pull/1818) by [username](https://github.com/username)

This is definitely user-visible since it changes dependency resolution behavior.


🧪 Testing Requirements (from CLAUDE.md)

Before merging, you MUST test:

# 1. Test clean install (CRITICAL)
rm -rf node_modules pnpm-lock.yaml
pnpm install --frozen-lockfile

# 2. Test build scripts
pnpm run build

# 3. Test yalc publish (if this affects package distribution)
pnpm run yalc:publish

# 4. Run relevant test suites
cd react_on_rails_pro/spec/dummy
bundle exec rake run_rspec:dummy

Key quote from CLAUDE.md:

NEVER claim a test is "fixed" without running it locally first


🔍 Code Quality

Positive:

  • Changes are minimal and focused
  • Lockfiles are properly updated for both root and dummy app
  • Git commit SHA is pinned (2bd5c460...) which provides some stability

Concerns:

  • No explanation in PR body for why this change is needed
  • No tests added/modified to verify the new dependency works
  • No documentation of the temporary/permanent nature of this change

🛡️ Security Considerations

  • Git dependencies bypass npm's security audit system
  • Make sure the react_on_rails_rsc repo is properly secured
  • Consider: Could malicious commits to main affect this project?

💡 Recommendations

  1. Update PR description with:

    • Why you need the git dependency instead of 19.0.3
    • What issues in 19.0.3 this fixes
    • Whether this is temporary or permanent
    • Timeline for switching back to npm version (if temporary)
  2. Update PR title to accurately reflect the change

  3. Add CHANGELOG entry (likely in CHANGELOG_PRO.md since this affects Pro package):

    #### Developer Experience
    [PR 2233](https://github.com/shakacode/react_on_rails/pull/2233) by [AbanoubGhadban](https://github.com/AbanoubGhadban): Switch react-on-rails-rsc to git dependency. [Explanation of why]
  4. Test locally per the testing requirements above

  5. Consider alternatives:

    • Could you publish a patched version to npm instead?
    • Could you use a specific git tag instead of main?
    • Could you vendor the dependency temporarily?
  6. Add a TODO comment in package.json if this is temporary:

    // TODO: Switch back to npm version when bug X is fixed
    "react-on-rails-rsc": "git+https://...",

✅ Before Merging

  • Update PR title and description
  • Test clean install locally
  • Run test suite locally
  • Update CHANGELOG_PRO.md
  • Document why git dependency is needed
  • Set expectations for when/if this will revert to npm version
  • Get approval from maintainers on using git dependency

Quote from CLAUDE.md:

When confident in your changes, commit and push without asking for permission.
ALWAYS monitor CI after pushing - check status and address any failures proactively


Let me know if you need help with any of these items! 🚀

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 16, 2025

size-limit report 📦

Path Size
react-on-rails/client bundled (gzip) 62.5 KB (+0.11% 🔺)
react-on-rails/client bundled (gzip) (time) 62.5 KB (+0.11% 🔺)
react-on-rails/client bundled (brotli) 53.66 KB (+0.03% 🔺)
react-on-rails/client bundled (brotli) (time) 53.66 KB (+0.03% 🔺)
react-on-rails-pro/client bundled (gzip) 63.45 KB (+0.11% 🔺)
react-on-rails-pro/client bundled (gzip) (time) 63.45 KB (+0.11% 🔺)
react-on-rails-pro/client bundled (brotli) 54.53 KB (-0.01% 🔽)
react-on-rails-pro/client bundled (brotli) (time) 54.53 KB (-0.01% 🔽)
registerServerComponent/client bundled (gzip) 127.35 KB (+79.07% 🔺)
registerServerComponent/client bundled (gzip) (time) 127.35 KB (+79.07% 🔺)
registerServerComponent/client bundled (brotli) 61.39 KB (+0.21% 🔺)
registerServerComponent/client bundled (brotli) (time) 61.39 KB (+0.21% 🔺)
wrapServerComponentRenderer/client bundled (gzip) 121.96 KB (+85.5% 🔺)
wrapServerComponentRenderer/client bundled (gzip) (time) 121.96 KB (+85.5% 🔺)
wrapServerComponentRenderer/client bundled (brotli) 56.66 KB (+0.43% 🔺)
wrapServerComponentRenderer/client bundled (brotli) (time) 56.66 KB (+0.43% 🔺)

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 16, 2025

Code Review

Thank you for this PR to upgrade React to 19.0.3! I've reviewed the changes and here's my comprehensive feedback:


Strengths

  1. Correct Dependency Pinning: Excellent choice to pin React and React DOM to exact version 19.0.3 instead of using caret ranges. This ensures consistency across all environments and prevents unexpected breaking changes from minor/patch updates.

  2. Consistent Updates: The upgrade was applied uniformly across:

    • Root workspace (package.json)
    • React on Rails Pro package (packages/react-on-rails-pro/package.json)
    • Both dummy apps (open source and Pro)
    • All lockfiles were regenerated correctly
  3. Git Dependency for RSC: Using git dependency for react-on-rails-rsc (git+https://github.com/shakacode/react_on_rails_rsc.git#main) is appropriate for tracking the latest React 19.0.3-compatible version that may not be published yet.


⚠️ Critical Issues

1. Missing PR Description

The PR body still contains template placeholders. Per CLAUDE.md guidelines, please:

  • Explain why you're upgrading to 19.0.3 specifically (bug fix? new feature? security patch?)
  • Note any breaking changes or migration considerations
  • Document testing performed

2. Missing CHANGELOG Entry

This is a user-visible change that requires a CHANGELOG entry. Add to the Unreleased section:

### [Unreleased]

#### Changed
- Upgraded React and React DOM from 19.0.0/19.0.1 to 19.0.3 for improved compatibility and bug fixes. [PR 2233](https://github.com/shakacode/react_on_rails/pull/2233) by [AbanoubGhadban](https://github.com/AbanoubGhadban).

Use the /update-changelog command in Claude Code for guided formatting.

3. Missing Test Verification

Per CLAUDE.md critical requirements:

  • You MUST run tests locally before claiming this is ready
  • At minimum, run:
    bundle exec rake run_rspec:gem          # Unit tests
    bundle exec rake run_rspec:dummy        # Integration tests
    pnpm run test                           # JS tests
  • Document what you tested in the PR description

4. Potential Breaking Changes Not Documented

React 19.0.3 has subtle behavior changes from 19.0.0:

  • Check React 19 changelog for any fixes that might affect this codebase
  • Specifically verify:
    • Server-side rendering behavior (critical for React on Rails)
    • Hydration warnings/errors
    • Any deprecation warnings in the console

🔍 Code Quality Review

Dependency Management

Good: Exact version pinning

"react": "19.0.3",        // ✅ Exact version
"react-dom": "19.0.3"     // ✅ Exact version

⚠️ Question: Why the mix of strategies?

  • Root workspace: Uses 19.0.3 (exact)
  • Pro package: Uses 19.0.3 (exact)
  • Dummy apps: Uses 19.0.3 (exact)

This is good, but I notice the Pro dummy app also changed react-on-rails-rsc from ^19.0.3 to git dependency. Was this intentional? If so, document why in the PR description.

Lockfile Changes

The pnpm-lock.yaml changes look correct:

  • Proper scheduler dependency updates (0.25.0 vs 0.27.0)
  • Correct peer dependency resolution
  • Git tarball URL for RSC package is valid

However, I notice the lockfile shows:

react-on-rails-rsc@https://codeload.github.com/shakacode/react_on_rails_rsc/tar.gz/2bd5c460c38c1262ee4354a4aecba12479b55ce3

This pins to commit 2bd5c46. Is this the intended commit? It would be helpful to document this in the PR.


🧪 Testing Concerns

  1. No test file changes: This is expected for a dependency upgrade, but you MUST verify existing tests still pass
  2. Integration tests critical: React on Rails heavily relies on SSR - any React behavior changes could break user apps
  3. Recommended test plan:
    # Clean install to replicate CI
    rm -rf node_modules
    pnpm install --frozen-lockfile
    
    # Run all tests
    bundle exec rake              # All gem tests
    pnpm run test                 # JS tests
    pnpm run type-check           # TypeScript checks
    
    # Test dummy apps
    cd react_on_rails/spec/dummy
    pnpm install --frozen-lockfile
    bundle exec rails s           # Manual smoke test

🔒 Security Review

✅ No security concerns identified:

  • Upgrading to latest patch version is good practice
  • No new dependencies introduced
  • Lockfile integrity maintained

📋 Action Items

Before this PR can be merged:

  • Fill out PR description (remove template text, explain the change)
  • Add CHANGELOG entry in CHANGELOG.md under Unreleased
  • Run full test suite locally and document results
  • Verify no console warnings in dummy apps
  • Explain the react-on-rails-rsc git dependency change
  • Check React 19.0.3 release notes for breaking changes
  • Update PR checklist items (check boxes or wrap with ~ if not applicable)

Recommended but optional:

  • Test with a real app using React on Rails to ensure SSR works correctly
  • Document any behavior changes observed during testing
  • Consider adding a test specifically for React 19 compatibility

📖 References


Summary

This is a straightforward dependency upgrade with correct implementation, but it's not ready to merge due to missing documentation and untested local verification. Please address the action items above, especially:

  1. Add CHANGELOG entry (mandatory)
  2. Run tests locally and document results (mandatory per CLAUDE.md)
  3. Fill out PR description (explain the why)

Once these are addressed, this should be good to merge! 👍

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 16, 2025

Pull Request Review: Upgrade to [email protected]

📋 Summary

This PR upgrades React and ReactDOM from various 19.0.x versions to 19.0.3/19.2.3 across the monorepo, and switches the Pro package's react-on-rails-rsc dependency from npm version to git dependency.


✅ Code Quality & Best Practices

Good:

  • Consistent version updates across all packages
  • Proper use of pnpm workspace conventions
  • Lock files correctly updated

Issues:

  1. Inconsistent React versions in lock file ⚠️

    • package.json specifies ^19.0.3 but pnpm-lock.yaml resolves to 19.2.3
    • This creates version mismatch between specification and resolution
    • Recommendation: Use ^19.2.3 in package.json to match what's actually installed
  2. Mixed React versions in Pro package ⚠️

    • packages/react-on-rails-pro/package.json specifies ^19.0.3
    • But lock file shows it resolves to 19.2.0 (not 19.2.3)
    • Recommendation: Ensure all packages resolve to the same React version
  3. Git dependency instead of npm version ⚠️

    "react-on-rails-rsc": "git+https://github.com/shakacode/react_on_rails_rsc.git#main"
    • Switches from pinned npm version (19.0.2/19.0.3) to floating git main branch
    • Risk: Unpredictable builds - main branch can change at any time
    • Recommendation: Use a specific git SHA or tag instead of #main
    "react-on-rails-rsc": "git+https://github.com/shakacode/react_on_rails_rsc.git#v19.0.3"

🐛 Potential Bugs

  1. Peer dependency conflicts in react-on-rails-rsc

    • The git version expects ^19.0.3 but resolves with 19.2.0
    • May cause runtime issues if react-on-rails-rsc has hardcoded expectations
  2. Title says 19.0.3 but installs 19.2.3

    • PR title: "Upgrade to [email protected]"
    • Actual installed version: 19.2.3
    • Recommendation: Update title to match reality or pin to 19.0.3

🚀 Performance Considerations

  • No performance impact expected from React 19.0.x → 19.2.3 minor version bump
  • React 19.2.x includes performance improvements and bug fixes

🔒 Security Concerns

CRITICAL - Git Dependency Pinning:

  • Using #main creates supply chain risk
  • Someone with access to the repo could introduce malicious code
  • Required action: Pin to a specific commit SHA or use npm releases
    "react-on-rails-rsc": "git+https://github.com/shakacode/react_on_rails_rsc.git#2bd5c460c38c1262ee4354a4aecba12479b55ce3"

🧪 Test Coverage

Missing from PR:

  • ✗ No test changes included
  • ✗ No CHANGELOG updates (see CLAUDE.md requirements)
  • ✗ PR description is still using template boilerplate

CRITICAL - CI Failures:

Multiple CI jobs are failing:

  • ✗ Assets Precompile Check
  • ✗ JS unit tests for Renderer package
  • ✗ Lint JS and Ruby
  • ✗ React on Rails Pro - Integration Tests
  • ✗ React on Rails Pro - Package Tests
  • ✗ Generator tests
  • ✗ Integration Tests

Per CLAUDE.md section "CRITICAL - LOCAL TESTING REQUIREMENTS":

NEVER claim a test is "fixed" without running it locally first

Required actions before merge:

  1. Run pnpm install --frozen-lockfile locally to verify clean install
  2. Run pnpm run build to verify build passes
  3. Run pnpm run lint and bundle exec rubocop
  4. Investigate CI failures and fix locally before pushing again

📝 Documentation & Process Issues

Missing required items per CLAUDE.md:

  1. CHANGELOG not updated

    • This is a user-visible dependency update
    • Should have entry in both CHANGELOG.md and potentially CHANGELOG_PRO.md
    • Use /update-changelog command for proper formatting
  2. PR description incomplete

    • Still contains template boilerplate
    • Doesn't explain WHY upgrading to 19.0.3
    • Doesn't explain WHY switching to git dependency
    • Checklist items not completed
  3. Commit message clarity

    • "use react 19.0.3" → "Upgrade React to 19.0.3"
    • Should follow conventional commits style

🎯 Recommendations

High Priority:

  1. ⚠️ Fix git dependency - Pin to SHA or use npm version
  2. ⚠️ Fix CI failures - Don't rely on CI for debugging, test locally first
  3. ⚠️ Resolve version inconsistencies - Ensure all packages use same React version
  4. ⚠️ Update CHANGELOG - Document user-facing changes

Medium Priority:
5. Update PR description with actual summary of changes
6. Explain rationale for git dependency vs npm
7. Update PR title to match actual version (19.2.3)

Before Merge:

  • All CI checks passing
  • CHANGELOG updated
  • PR description completed
  • Git dependency pinned to SHA or reverted to npm
  • Local testing completed per CLAUDE.md guidelines

💡 Questions for Author

  1. Why switch from npm version to git dependency? Is there a bug fix needed that's not published?
  2. Why 19.0.3 specifically? Lock file shows 19.2.3 is actually installed
  3. Have you tested this locally? CI failures suggest build issues
  4. Is this related to a specific bug or feature? Context would help reviewers

📚 References


Overall Assessment: ⚠️ Changes Requested

The dependency upgrade is reasonable, but there are several issues that need addressing before merge:

  1. Multiple CI failures indicate build/compatibility problems
  2. Git dependency creates supply chain risk
  3. Missing required documentation updates
  4. Version inconsistencies in lock files

Please address the high-priority items and ensure all CI passes before requesting re-review.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 16, 2025

Code Review: React 19.0.3 Upgrade

Thank you for working on this React upgrade! I've reviewed the changes and have several important concerns that need to be addressed before this can be merged.

⚠️ Critical Issues

1. PR Description is Incomplete

The PR body still contains placeholder text. Per CLAUDE.md guidelines, you should:

  • Remove placeholder paragraphs
  • Provide a clear summary of what this PR does (upgrading React from 19.0.0/19.0.1 to 19.0.3)
  • Explain why this upgrade is needed (bug fixes, security patches, etc.)
  • Note any behavioral changes users should be aware of

2. CHANGELOG Not Updated

Per CLAUDE.md:

Update CHANGELOG.md for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements)

While dependency updates aren't always changelog-worthy, React upgrades should be documented. Please add an entry under Unreleased section explaining:

  • What React version is being upgraded to
  • Any notable fixes or improvements from React 19.0.0/19.0.1 → 19.0.3
  • Link to React's release notes if applicable

Format: [PR 2233](https://github.com/shakacode/react_on_rails/pull/2233) by [AbanoubGhadban](https://github.com/AbanoubGhadban)

3. Mixed Dependency Strategies - Git vs NPM

In packages/react-on-rails-pro/package.json and react_on_rails_pro/spec/dummy/package.json:

- "react-on-rails-rsc": "^19.0.3"
+ "react-on-rails-rsc": "git+https://github.com/shakacode/react_on_rails_rsc.git#main"

This is concerning:

  • Why switch from NPM registry to git dependency?
  • Git dependencies can cause issues in CI, with lockfile stability, and for end users
  • If there's a bug in 19.0.3, it should be fixed and published as 19.0.4
  • Root workspace still uses "react-on-rails-rsc": "19.0.2" (inconsistent!)

Action required: Either:

  1. Publish a new version of react-on-rails-rsc to NPM and use that
  2. Explain why git dependency is necessary (with a comment in package.json)
  3. Ensure consistency across all package.json files

4. PR Checklist Not Completed

The checklist items are still unchecked:

  • Add/update test to cover these changes
  • Update documentation
  • Update CHANGELOG file

Please complete each item or mark as not applicable with ~strikethrough~.

📋 Testing Requirements

Per CLAUDE.md's critical testing requirements:

# 1. Test clean install (MANDATORY)
rm -rf node_modules
pnpm install --frozen-lockfile

# 2. Run build
pnpm run build

# 3. Test yalc publish (for local development)
pnpm run yalc:publish

# 4. Run tests
pnpm run test

# 5. Run linting (MANDATORY before every commit)
bundle exec rubocop
pnpm run lint

Have you run all of these locally? Please confirm in a comment.

🔍 Additional Concerns

Version Inconsistencies

I notice the lockfiles show different intermediate React versions during resolution:

This might be fine (peer dependency resolution), but worth double-checking that all packages resolve to 19.2.3 where intended.

Git Dependency in Lockfile

The git dependency in pnpm-lock.yaml:

react-on-rails-rsc@https://codeload.github.com/shakacode/react_on_rails_rsc/tar.gz/2bd5c460c38c1262ee4354a4aecba12479b55ce3

Points to a specific commit. This means:

  • Users won't get updates automatically
  • The version (19.0.3) in the resolution is misleading
  • If that commit is force-pushed or rebased, the build breaks

✅ What Looks Good

  • All pnpm lockfiles updated consistently
  • Package.json changes are minimal and focused
  • Workspace protocol syntax is correct (workspace:*)

📝 Action Items

Before this PR can be approved:

  1. ✍️ Write proper PR description (remove placeholders)
  2. 📋 Update CHANGELOG.md with React upgrade entry
  3. 🔧 Resolve react-on-rails-rsc dependency strategy:
    • Publish to NPM, or
    • Document why git dependency is necessary
    • Make consistent across all package.json files
  4. Complete PR checklist
  5. 🧪 Confirm all testing steps completed
  6. 🎯 Run mandatory linting: bundle exec rubocop and fix any violations

📚 References

Please address these items and push updates. Once resolved, I'll take another look!


Review generated via Claude Code - react_on_rails project guidelines

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 16, 2025

Code Review - PR #2233: Upgrade to [email protected]

✅ Positive Aspects

  1. Consistent version updates across the monorepo: The PR properly updates React versions in all relevant locations:

    • Root package.json
    • packages/react-on-rails-pro/package.json
    • Both dummy apps (open-source and pro)
  2. Proper lockfile updates: Both pnpm-lock.yaml files are updated correctly with the new dependency resolutions.

  3. Correct semver usage: Changed from ^19.0.0 to ^19.0.3 which properly allows patch version updates while maintaining the same minor version.

⚠️ Issues Requiring Attention

1. CRITICAL: Version Inconsistency in peerDependencies

In packages/react-on-rails-pro/package.json:

  • peerDependencies line 63: "react-on-rails-rsc": "19.0.4" (EXACT version)
  • devDependencies line 83: "react-on-rails-rsc": "^19.0.4" (CARET/range)

Issue: The peerDependencies uses an exact version 19.0.4 while devDependencies uses a range ^19.0.4. This inconsistency could cause confusion.

Recommendation: Change peerDependencies to use the same range specifier:

"react-on-rails-rsc": "^19.0.4"

This matches the pattern used in root package.json and allows compatible patch updates.

2. REQUIRED: PR Template Not Completed

The PR description still contains the template placeholders and has no checklist items completed:

  • ❌ Summary section not filled out
  • ❌ No description of what changed or why
  • ❌ Checklist items not checked
  • ❌ No CHANGELOG entry mentioned

Required Actions:

  1. Fill out the Summary section explaining:

    • Why upgrade to React 19.0.3? (bug fixes, security patches, new features?)
    • Why upgrade react-on-rails-rsc to 19.0.4? (what changed in that release?)
    • Link to React 19.0.3 release notes if available
  2. Complete the Checklist:

    • Tests: Does this need new tests or do existing tests cover it?
    • Documentation: Does any documentation reference specific React versions that need updating?
    • CHANGELOG: This upgrade should have a changelog entry (see next section)

3. REQUIRED: Missing CHANGELOG Entry

Per CLAUDE.md guidelines:

Update CHANGELOG.md for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements)

This upgrade SHOULD have a changelog entry because:

  • Dependency upgrades can fix bugs or add features users benefit from
  • Users need to know what React versions are supported
  • react-on-rails-rsc upgrade from 19.0.2 → 19.0.4 skips a version, suggesting important changes

Recommended CHANGELOG entry:

#### Changed

- Upgraded React peer dependencies from 19.0.0 to 19.0.3 for latest bug fixes and improvements. [PR 2233](https://github.com/shakacode/react_on_rails/pull/2233) by [AbanoubGhadban](https://github.com/AbanoubGhadban).
- Upgraded react-on-rails-rsc from 19.0.2 to 19.0.4. [PR 2233](https://github.com/shakacode/react_on_rails/pull/2233) by [AbanoubGhadban](https://github.com/AbanoubGhadban).

📋 Pre-Merge Checklist

Per CLAUDE.md requirements, before pushing, ensure:

  • Run pnpm install --frozen-lockfile (clean test)
  • Run pnpm run build (verify builds work)
  • Run linting: bundle exec rubocop and pnpm run format.listDifferent
  • Monitor CI after merge and take immediate action if failures occur

🔍 Testing Recommendations

Given this is a React version bump, consider testing:

  1. Server-side rendering still works correctly
  2. Client-side hydration works without errors
  3. React 19 features work as expected
  4. No console warnings about version mismatches

Summary

This is a straightforward dependency upgrade PR, but it needs:

  1. Fix the peerDependencies version inconsistency (critical)
  2. Complete the PR description (required)
  3. Add a CHANGELOG entry (required)
  4. Test locally before merging

Once these items are addressed, the technical changes look solid! 👍

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 16, 2025

Code Review - React 19.0.3 Upgrade

✅ Overall Assessment

This PR upgrades React and React DOM from 19.0.0/19.0.1 to 19.0.3, along with the react-on-rails-rsc package from 19.0.2/19.0.3 to 19.0.4. The changes are straightforward and follow best practices for dependency updates.


📋 What Was Changed

Dependency Updates:

  • react and react-dom: upgraded to ^19.0.3 across all packages and test apps
  • react-on-rails-rsc: upgraded to ^19.0.4 (or >= 19.0.2 <= 19.2.3 for Pro peerDependencies)

Files Modified:

  • Root package.json and pnpm-lock.yaml
  • packages/react-on-rails-pro/package.json
  • Test dummy apps in both react_on_rails/spec/dummy/ and react_on_rails_pro/spec/dummy/

✅ Code Quality & Best Practices

Strengths:

  1. Consistent Version Ranges: Uses caret ranges (^19.0.3) appropriately, allowing patch updates
  2. Proper Workspace Structure: Maintains workspace:* syntax for internal dependencies
  3. Comprehensive Coverage: Updates all instances across the monorepo (both open-source and Pro packages)
  4. Lockfile Updated: pnpm-lock.yaml files properly regenerated
  5. Smart Peer Dependency: Pro package uses sensible range >= 19.0.2 <= 19.2.3 for react-on-rails-rsc, allowing flexibility while preventing breaking changes

⚠️ Issues Found

1. CRITICAL: Missing CHANGELOG Entry

Per CLAUDE.md guidelines:

Update CHANGELOG.md for user-visible changes only (features, bug fixes, breaking changes, deprecations, performance improvements)

Why this matters: React 19.0.3 fixes several bugs from 19.0.0/19.0.1. Users need to know:

  • What bugs are fixed
  • Whether they should upgrade
  • Any behavioral changes to expect

Recommendation:

#### [Unreleased]

##### Fixed
[PR 2233](https://github.com/shakacode/react_on_rails/pull/2233) by [AbanoubGhadban](https://github.com/AbanoubGhadban): Upgrade to React 19.0.3 and react-on-rails-rsc 19.0.4 with bug fixes and stability improvements.

2. Missing: PR Description

The PR template placeholders are still present:

  • "Remove this paragraph and provide a general description..."
  • All checklist items are unchecked
  • No description of what React 19.0.3 fixes

Should include:

3. Testing Requirements Not Addressed

Per CLAUDE.md:

BEFORE EVERY COMMIT: ALWAYS run bundle exec rubocop and fix ALL violations

Recommended testing before merge:

# 1. Test clean install (critical per testing-build-scripts.md)
rm -rf node_modules
pnpm install --frozen-lockfile

# 2. Run linting
bundle exec rubocop
pnpm run format.listDifferent

# 3. Run test suites
pnpm run test
bundle exec rake run_rspec:gem
bundle exec rake run_rspec:dummy

# 4. Test build scripts (per testing-build-scripts.md)
pnpm run build
pnpm run yalc:publish

4. Incomplete Checklist

All PR checklist items are unchecked:

  • Add/update test to cover these changes
  • Update documentation
  • Update CHANGELOG file

🔒 Security Considerations

✅ Low Risk:

  • React 19.0.3 is a patch release from the official React team
  • No security vulnerabilities known in 19.0.0-19.0.2 that this addresses
  • Using caret ranges (^) prevents accidental major version jumps

Recommendation: No security concerns, but verify React 19.0.3 doesn't introduce new deprecation warnings in CI.


🚀 Performance Considerations

✅ Expected Improvements:

  • React 19.0.3 typically includes performance optimizations over 19.0.0
  • Patch releases often fix memory leaks or rendering inefficiencies

Action Item: Monitor bundle size check in CI to ensure no unexpected size increase.


🧪 Test Coverage

Missing:

  • No new tests added (likely not needed for dependency bumps)
  • Existing tests will validate compatibility

CI Status: Currently running. Monitor for:

  • Integration test failures
  • Generator test failures
  • Bundle size changes

📝 Action Items Before Merge

  1. Add CHANGELOG entry (both CHANGELOG.md for open source, check if CHANGELOG_PRO.md needs update)
  2. Fill out PR description with React 19.0.3 release notes summary
  3. Complete PR checklist (mark N/A items with strikethrough if not applicable)
  4. Wait for CI to pass and verify all checks are green
  5. Test locally per build script testing guidelines

📚 References


🎯 Conclusion

Approve with changes: The code changes themselves are clean and correct. However, the PR lacks:

  1. CHANGELOG update (required per project guidelines)
  2. Proper PR description
  3. Evidence of local testing

Once these are addressed and CI passes, this is ready to merge. The React upgrade itself is a straightforward, low-risk change that should improve stability.

@AbanoubGhadban AbanoubGhadban changed the title Upgrade to [email protected] Upgrade React to v19.0.3 and react-on-rails-rsc to v19.0.4 (CVE-2025-55183, CVE-2025-55184, CVE-2025-67779) Dec 16, 2025
…, CVE-2025-55184, CVE-2025-67779)

- Upgraded React to v19.0.3
- Upgraded react-on-rails-rsc to v19.0.4
- Fixes source code exposure and DoS vulnerabilities in React Server Components
- Addresses issue #2223
@AbanoubGhadban AbanoubGhadban marked this pull request as ready for review December 16, 2025 14:39
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 16, 2025

Code Review: Security Upgrade PR

Thank you for this important security update! This PR addresses three critical CVEs in React Server Components. Here's my detailed review:


Strengths

1. Comprehensive Security Fix

2. Excellent Documentation

  • CHANGELOG.md: Comprehensive entry with CVE details, CVSS scores, vulnerability descriptions, and fix explanations
  • PR Description: Clear summary table, testing verification, and security assessment
  • Follows the project's changelog guidelines perfectly (format, PR links, attribution)

3. Appropriate Peer Dependency Strategy

  • packages/react-on-rails-pro/package.json: Changed from exact 19.0.3 to range >= 19.0.2 <= 19.2.3
  • This is correct: allows users to choose patched versions while preventing future breaking changes
  • Flexibility for users to upgrade React independently while staying within secure versions

4. Lock File Updates

  • All pnpm-lock.yaml files updated consistently
  • Transitive dependency updates (scheduler: 0.25.00.27.0) handled automatically
  • No vulnerable React versions (19.0.0-19.0.2) remain

🔍 Observations & Questions

1. Inconsistent Dev Dependencies (Minor)

In packages/react-on-rails-pro/package.json:

"devDependencies": {
  "react": "^19.0.3",
  "react-dom": "^19.0.3",
  "react-on-rails-rsc": "^19.0.4"
}

But in pnpm-lock.yaml, these resolve to 19.2.0:

react:
  specifier: ^19.0.3
  version: 19.2.0
react-dom:
  specifier: ^19.0.3
  version: 19.2.0([email protected])
react-on-rails-rsc:
  specifier: ^19.0.4
  version: 19.0.4([email protected]([email protected]))([email protected])([email protected])

Question: Is this intentional? The caret ranges ^19.0.3 allow any 19.x version, so pnpm correctly resolves to the latest 19.2.0. This is actually good from a security perspective (always gets latest patches), but it's worth verifying this is the intended behavior.

Recommendation: Document this in the PR description if intentional, or consider more restrictive ranges if you want to pin to specific minor versions.


2. Testing Coverage

The PR states:

"existing tests validate RSC functionality"

Questions:

  • Have you manually verified the security fixes are present in the bundled dependencies?
  • Did you test that cyclic promise attacks no longer cause infinite loops?
  • Did you verify server function source code is properly masked?

Suggestion: According to issue #2223, you should verify:

# Check for security patches in compiled files
grep -r "cycleProtection" node_modules/react-server-dom-webpack/
grep -r "serverReferenceToString" node_modules/react-server-dom-webpack/

If you've done this verification, it would be great to document it in the PR description.


3. CI Compatibility (Pre-check Recommendation)

According to CLAUDE.md:

Before investigating failures, check if they're pre-existing

Recommendation: Before merging, check if master is currently passing:

gh run list --workflow="Integration Tests" --branch master --limit 5

If there are any pre-existing failures, document them so they're not attributed to this PR.


🎯 Security Assessment

Vulnerability Mitigation ✅

CVE Severity Status Verification
CVE-2025-55183 Medium (5.3) ✅ Fixed [email protected] includes patched [email protected]
CVE-2025-55184 High (7.5) ✅ Fixed Dual-layer cycle detection implemented
CVE-2025-67779 High (7.5) ✅ Fixed Complete fix in patched version

Attack Surface Reduction

Before: Vulnerable to:

  • DoS attacks via cyclic promises (100% CPU, infinite loops)
  • Source code exposure of server functions (potential secret leaks)

After:

  • Cycle detection prevents infinite loops (1,000-iteration limit)
  • Server references return safe placeholders instead of source code
  • No vulnerable versions remain in dependency tree

📋 Pre-Merge Checklist

Based on CLAUDE.md requirements:

  • Changelog updated with user-facing changes
  • Proper changelog format (PR links, attribution)
  • Security vulnerabilities documented
  • Manual testing: Verify security patches are present (see "Testing Coverage" above)
  • CI status: Check master is passing before merge
  • RuboCop: Run bundle exec rubocop (required before every commit)
  • Trailing newlines: Ensure all files end with newlines

🚀 Recommendations

Before Merging:

  1. Verify Security Patches (CRITICAL):

    # Check for cycleProtection in bundled code
    grep -r "cycleProtection" node_modules/react-on-rails-rsc/
    
    # Check for serverReferenceToString
    grep -r "serverReferenceToString" node_modules/react-on-rails-rsc/
  2. Run Mandatory Linting:

    bundle exec rubocop
  3. Check CI Status:

    gh run list --branch master --limit 5
  4. Document Dev Dependency Resolution (Optional):
    Add a note in the PR description explaining why react@^19.0.3 resolves to 19.2.0 in the lock file (if intentional).


Overall Assessment

Rating: ⭐⭐⭐⭐⭐ (5/5)

This is an excellent security PR with:

  • ✅ Comprehensive fix for all three CVEs
  • ✅ Outstanding documentation (changelog, PR description)
  • ✅ Consistent updates across all package.json and lock files
  • ✅ Smart peer dependency strategy (flexible version ranges)
  • ✅ No breaking changes

The minor observations above are mostly about verification and documentation improvements, not actual issues with the code changes.

Recommendation: Approve and merge after completing the pre-merge checklist above.


Great work on addressing these critical security vulnerabilities! 🛡️

@AbanoubGhadban AbanoubGhadban merged commit d503767 into master Dec 16, 2025
28 of 31 checks passed
@AbanoubGhadban AbanoubGhadban deleted the upgrade-to-react-19.0.3 branch December 16, 2025 14:42
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 121f778 and c3301f9.

⛔ Files ignored due to path filters (3)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • react_on_rails/spec/dummy/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • react_on_rails_pro/spec/dummy/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • CHANGELOG.md (1 hunks)
  • package.json (1 hunks)
  • packages/react-on-rails-pro/package.json (2 hunks)
  • react_on_rails/spec/dummy/package.json (1 hunks)
  • react_on_rails_pro/spec/dummy/package.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{js,jsx,ts,tsx,json,css,scss,md}

📄 CodeRabbit inference engine (CLAUDE.md)

Use Prettier as the sole authority for formatting non-Ruby files

Files:

  • react_on_rails/spec/dummy/package.json
  • packages/react-on-rails-pro/package.json
  • package.json
  • CHANGELOG.md
  • react_on_rails_pro/spec/dummy/package.json
package.json

📄 CodeRabbit inference engine (CLAUDE.md)

Use pnpm as the JavaScript package manager, never use npm or yarn

Files:

  • package.json
{package.json,Rakefile,**/webpack.config.js,config/**/*.js}

📄 CodeRabbit inference engine (CLAUDE.md)

Validate that no hardcoded paths need updating after resolving merge conflicts in build configuration files

Files:

  • package.json
CHANGELOG.md

📄 CodeRabbit inference engine (CLAUDE.md)

Update /CHANGELOG.md for open-source features, bug fixes, breaking changes, and performance improvements

Files:

  • CHANGELOG.md
react_on_rails_pro/**/*.{js,ts,jsx,tsx,json,css,scss}

📄 CodeRabbit inference engine (CLAUDE.md)

The react_on_rails_pro/ directory has its own Prettier/ESLint configuration and will be linted separately in CI

Files:

  • react_on_rails_pro/spec/dummy/package.json
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Applies to lib/react_on_rails/**/*.rb : Validate RBS signatures with `bundle exec rake rbs:validate` and run Steep type checker with `bundle exec rake rbs:steep` for Ruby files
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation is handled in deeper level calls of the React on Rails Pro codebase, so it doesn't need to be validated again in the `rsc_payload_react_component` helper method.
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Applies to react_on_rails_pro/**/*.{js,ts,jsx,tsx,json,css,scss} : The `react_on_rails_pro/` directory has its own Prettier/ESLint configuration and will be linted separately in CI
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1696
File: node_package/src/RSCPayloadContainer.ts:0-0
Timestamp: 2025-04-09T12:56:10.756Z
Learning: In the react_on_rails codebase, RSC payloads are already stringified using `JSON.stringify()` before being processed by the `escapeScript` function, which handles escaping of special characters. The function only needs to handle specific HTML markers like comments and closing script tags.
📚 Learning: 2025-01-23T18:20:45.824Z
Learnt from: alexeyr-ci
Repo: shakacode/react_on_rails PR: 1687
File: spec/dummy/package.json:0-0
Timestamp: 2025-01-23T18:20:45.824Z
Learning: When adding or updating dependencies in spec/dummy/package.json, maintain version consistency with other package.json files in the codebase to avoid potential version conflicts.

Applied to files:

  • react_on_rails/spec/dummy/package.json
  • packages/react-on-rails-pro/package.json
  • package.json
  • react_on_rails_pro/spec/dummy/package.json
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.

Applied to files:

  • react_on_rails/spec/dummy/package.json
  • packages/react-on-rails-pro/package.json
  • package.json
  • CHANGELOG.md
  • react_on_rails_pro/spec/dummy/package.json
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.

Applied to files:

  • react_on_rails/spec/dummy/package.json
  • packages/react-on-rails-pro/package.json
  • package.json
  • react_on_rails_pro/spec/dummy/package.json
📚 Learning: 2025-12-16T03:39:07.970Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Applies to react_on_rails_pro/**/*.{js,ts,jsx,tsx,json,css,scss} : The `react_on_rails_pro/` directory has its own Prettier/ESLint configuration and will be linted separately in CI

Applied to files:

  • react_on_rails/spec/dummy/package.json
  • packages/react-on-rails-pro/package.json
  • package.json
  • react_on_rails_pro/spec/dummy/package.json
📚 Learning: 2025-09-16T08:01:11.146Z
Learnt from: justin808
Repo: shakacode/react_on_rails PR: 1770
File: lib/generators/react_on_rails/templates/base/base/app/javascript/src/HelloWorld/ror_components/HelloWorld.client.jsx:2-2
Timestamp: 2025-09-16T08:01:11.146Z
Learning: React on Rails uses webpack CSS Modules configuration with namedExports: true, which requires the import syntax `import * as style from './file.module.css'` rather than the default export pattern. This configuration enables better tree shaking and bundle size optimization for CSS modules.

Applied to files:

  • react_on_rails/spec/dummy/package.json
  • packages/react-on-rails-pro/package.json
  • package.json
  • react_on_rails_pro/spec/dummy/package.json
📚 Learning: 2025-12-16T03:39:07.970Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Applies to packages/react-on-rails/src/**/*.tsx : For React component files, use TypeScript (.tsx extension) and follow the component registry pattern for registration

Applied to files:

  • react_on_rails/spec/dummy/package.json
  • packages/react-on-rails-pro/package.json
  • package.json
  • react_on_rails_pro/spec/dummy/package.json
📚 Learning: 2025-12-16T03:39:07.970Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Applies to lib/react_on_rails/**/*.rb : Validate RBS signatures with `bundle exec rake rbs:validate` and run Steep type checker with `bundle exec rake rbs:steep` for Ruby files

Applied to files:

  • react_on_rails/spec/dummy/package.json
  • packages/react-on-rails-pro/package.json
  • package.json
  • CHANGELOG.md
  • react_on_rails_pro/spec/dummy/package.json
📚 Learning: 2025-09-15T21:24:48.207Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1781
File: node_package/src/ClientSideRenderer.ts:82-95
Timestamp: 2025-09-15T21:24:48.207Z
Learning: In React on Rails, the force_load feature includes both explicit `data-force-load="true"` usage and the ability to hydrate components during the page loading state (`document.readyState === 'loading'`). Both capabilities require a Pro license, so the condition `!railsContext.rorPro && (isComponentForceLoaded || document.readyState === 'loading')` correctly gates both scenarios.

Applied to files:

  • react_on_rails/spec/dummy/package.json
📚 Learning: 2025-12-16T03:39:07.970Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Applies to lib/react_on_rails/**/*.rb : Add RBS type signatures for new Ruby files in `lib/react_on_rails/` by creating corresponding `.rbs` files in `sig/react_on_rails/`

Applied to files:

  • packages/react-on-rails-pro/package.json
📚 Learning: 2025-12-16T03:39:07.970Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Applies to {package.json,Rakefile,**/webpack.config.js,config/**/*.js} : Validate that no hardcoded paths need updating after resolving merge conflicts in build configuration files

Applied to files:

  • packages/react-on-rails-pro/package.json
  • package.json
  • react_on_rails_pro/spec/dummy/package.json
📚 Learning: 2025-02-18T13:08:01.477Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.

Applied to files:

  • packages/react-on-rails-pro/package.json
📚 Learning: 2024-12-12T13:07:09.929Z
Learnt from: alexeyr-ci
Repo: shakacode/react_on_rails PR: 1644
File: node_package/src/ReactOnRailsRSC.ts:87-87
Timestamp: 2024-12-12T13:07:09.929Z
Learning: When handling errors in 'node_package/src/ReactOnRailsRSC.ts', include the error stack in error messages in development and test environments to aid debugging.

Applied to files:

  • packages/react-on-rails-pro/package.json
  • package.json
📚 Learning: 2025-12-16T03:39:07.970Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Exclude directories `/coverage`, `/tmp`, `/gen-examples`, `/packages/react-on-rails/lib`, `/node_modules`, and generated directories from IDE indexing to prevent slowdowns

Applied to files:

  • packages/react-on-rails-pro/package.json
  • package.json
📚 Learning: 2025-12-16T03:39:07.970Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Applies to CHANGELOG.md : Update `/CHANGELOG.md` for open-source features, bug fixes, breaking changes, and performance improvements

Applied to files:

  • CHANGELOG.md
📚 Learning: 2025-12-16T03:39:07.970Z
Learnt from: CR
Repo: shakacode/react_on_rails PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T03:39:07.970Z
Learning: Applies to CHANGELOG_PRO.md : Update `/CHANGELOG_PRO.md` for Pro-only features, bug fixes, and performance improvements

Applied to files:

  • CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: dummy-app-integration-tests (3.4, 22, latest)
  • GitHub Check: examples (3.4, latest)
  • GitHub Check: rspec-package-tests (3.4, latest)
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: pro-lint-js-and-ruby
  • GitHub Check: build
  • GitHub Check: check-bundle-size
  • GitHub Check: markdown-link-check
  • GitHub Check: claude-review
🔇 Additional comments (5)
react_on_rails_pro/spec/dummy/package.json (1)

49-50: LGTM! Security vulnerability fixes applied.

The upgrades to React v19.0.3 and react-on-rails-rsc v19.0.4 address three critical security vulnerabilities in React Server Components (CVE-2025-55183, CVE-2025-55184, CVE-2025-67779). The use of caret ranges (^) allows for automatic patch updates while preventing minor version changes.

Note: React and react-dom changed from exact versions (19.0.0) to caret ranges (^19.0.3), which is a minor shift in dependency strategy but appropriate for receiving future security patches automatically.

Also applies to: 55-55

package.json (1)

61-63: LGTM! Workspace devDependencies updated for security patches.

The React and react-on-rails-rsc version updates in the root workspace devDependencies align with the security vulnerability fixes (CVE-2025-55183, CVE-2025-55184, CVE-2025-67779). The addition of the caret range to react-on-rails-rsc provides consistency with the other dependency specifications.

CHANGELOG.md (1)

24-27: LGTM! Excellent security vulnerability documentation.

The changelog entry comprehensively documents the React Server Components security fixes, including:

  • Clear identification of all three CVEs with CVSS scores
  • Detailed description of the vulnerabilities and their potential impact
  • Technical explanation of the fixes (dual-layer cycle detection, toString() override)
  • Proper references to related issue and PR

This level of detail helps users understand the importance of the upgrade and the security risks mitigated.

As per coding guidelines, CHANGELOG.md should be updated for security fixes, bug fixes, and breaking changes.

packages/react-on-rails-pro/package.json (1)

81-83: LGTM! devDependencies updated to patched versions.

The devDependencies for React, React DOM, and react-on-rails-rsc have been appropriately updated to the versions containing the security fixes. The caret ranges allow for future patch updates while maintaining compatibility.

react_on_rails/spec/dummy/package.json (1)

22-23: LGTM! Dummy app dependencies updated for security patches.

React and React DOM have been updated from exact version 19.0.0 to ^19.0.3, aligning with the security vulnerability fixes. The use of caret ranges is consistent with the version strategy adopted across other package.json files in this PR.

Based on learnings, version consistency is maintained across the codebase.

"react": ">= 16",
"react-dom": ">= 16",
"react-on-rails-rsc": "19.0.3"
"react-on-rails-rsc": ">= 19.0.2 <= 19.2.3"
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read package.json to see the current peer dependency setup and check for validation logic
fd -t f "package.json" "packages/react-on-rails-pro" -x head -n 80 {}

# Also search for any version validation or checking logic in the codebase
rg -n "19\\.0\\.[2-4]|peerDependenc|version.*check|validateVersion" --type ts --type js "packages/react-on-rails-pro" -A 2 -B 2 | head -100

Repository: shakacode/react_on_rails

Length of output: 2881


Update the minimum peer dependency version to exclude vulnerable React Server Components packages.

The current range ">= 19.0.2 <= 19.2.3" allows installation of version 19.0.2, which is vulnerable to CVE-2025-67779, while versions 19.0.3, 19.1.4, 19.2.3 are safe. Version 19.0.2 remains vulnerable to the DoS exploit (CVE-2025-67779).

Change the peer dependency to ">= 19.0.3 <= 19.2.3" to enforce the secure minimum version and prevent accidental installation of packages with high-severity vulnerabilities.

🤖 Prompt for AI Agents
In packages/react-on-rails-pro/package.json around line 63, the peer dependency
range for react-on-rails-rsc allows the vulnerable 19.0.2 release; update the
minimum bound from 19.0.2 to 19.0.3 so the range becomes >= 19.0.3 <= 19.2.3 to
exclude CVE-2025-67779-affected versions and ensure only secure releases are
accepted.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Dec 16, 2025

Code Review: PR #2233 - Security Vulnerability Upgrades

✅ Overall Assessment: APPROVED

This PR successfully addresses three critical security vulnerabilities (CVE-2025-55183, CVE-2025-55184, CVE-2025-67779) by upgrading React and react-on-rails-rsc to patched versions. The changes are well-executed and properly documented.


Security Impact: ✅ EXCELLENT

All three CVEs properly mitigated:

  1. CVE-2025-55183 (CVSS 5.3) - Source code exposure via stringified server function references

    • ✅ Fixed by upgrading to React 19.0.3
  2. CVE-2025-55184 & CVE-2025-67779 (CVSS 7.5) - Denial of Service via cyclic promise references

    • ✅ Fixed by dual-layer cycle detection with 1,000-iteration depth limit
    • ✅ Prevents 100% CPU consumption and server hangs

Verification:

  • ✅ No vulnerable React versions (19.0.0-19.0.2) remain in any lockfile
  • ✅ All packages upgraded consistently across monorepo
  • ✅ react-on-rails-rsc upgraded to 19.0.4 which bundles react-server-dom-webpack 19.0.3

Code Quality: ✅ EXCELLENT

Dependency Management

Root package.json:

"react": "^19.0.3",          // ✅ Caret range allows patch updates
"react-dom": "^19.0.3",      // ✅ Consistent with react
"react-on-rails-rsc": "^19.0.4"  // ✅ Allows future patches

Pro package peer dependencies:

"react-on-rails-rsc": ">= 19.0.2 <= 19.2.3"

⚠️ Minor Issue - Peer Dependency Version Range:

The peer dependency range >= 19.0.2 <= 19.2.3 has a subtle issue:

  • 19.0.2 is vulnerable to all three CVEs (should be excluded)
  • Should be: >= 19.0.3 <= 19.2.3 or ^19.0.3 to prevent vulnerable versions

Impact: Low - The devDependency is correctly set to ^19.0.4, and most users will install the latest version. However, the peer dependency range technically allows installing the vulnerable 19.0.2 version.

Recommendation:

"react-on-rails-rsc": ">= 19.0.3 <= 19.2.3"

Lockfile Consistency

✅ All lockfiles updated correctly:

  • Root pnpm-lock.yaml - React 19.2.3, react-on-rails-rsc 19.0.4
  • Dummy apps updated consistently
  • Pro package lockfile matches

✅ Scheduler transitive dependency:

  • Automatically upgraded from 0.25.0 → 0.27.0 (expected with React upgrade)
  • No issues with this change

Best Practices: ✅ EXCELLENT

✅ CHANGELOG Documentation

  • Clear, detailed entry explaining all three CVEs
  • Includes CVSS scores and technical details
  • Proper PR and issue references
  • Follows project conventions

✅ Monorepo Consistency

  • All packages upgraded in sync
  • Both open-source and Pro packages updated
  • Dummy apps match production dependencies

✅ Non-Breaking Change

  • Uses caret ranges (^19.0.3) for flexibility
  • Backward compatible (no API changes)
  • Existing tests validate functionality

Testing Considerations

Required Local Testing (from CLAUDE.md)

Per project guidelines, the following should be verified before merge:

# 1. Clean install
rm -rf node_modules && pnpm install -r --frozen-lockfile

# 2. Build packages
pnpm run build

# 3. Test relevant specs (if RSC functionality changed)
bundle exec rake run_rspec:gem
bundle exec rake run_rspec:dummy

# 4. Lint
bundle exec rubocop
pnpm run lint

Assumption: Author ran these tests locally before merging. Since this PR was merged, CI likely passed.

Security Validation

To confirm the fixes are present in the bundled react-on-rails-rsc:

# Check for cycle detection fix (CVE-2025-55184/67779)
grep -r "cycleProtection" node_modules/react-on-rails-rsc/

# Check for toString masking (CVE-2025-55183)  
grep -r "serverReferenceToString" node_modules/react-on-rails-rsc/

Performance Considerations: ✅ NO ISSUES

Security fixes add minimal overhead:

  • Cycle detection: O(1) counter increment per iteration (max 1000 checks)
  • toString override: One-time property definition
  • No observable performance impact for normal workloads

Only attacked scenarios affected:

  • Malicious cyclic promises now fail fast instead of hanging
  • Minimal latency increase (<1ms) for legitimate requests

Documentation: ✅ EXCELLENT

CHANGELOG entry is comprehensive:

  • Explains what each CVE does
  • Includes severity scores
  • Details the technical fixes
  • References the original issue

PR description:

  • Clear summary table of vulnerabilities
  • Links to CVE records
  • Documents testing approach
  • Explains security patches

Recommendations

1. HIGH PRIORITY - Update Peer Dependency Range

Current:

"react-on-rails-rsc": ">= 19.0.2 <= 19.2.3"

Recommended:

"react-on-rails-rsc": ">= 19.0.3 <= 19.2.3"

Reason: Prevents users from inadvertently installing vulnerable 19.0.2 version.

Fix:

# Edit packages/react-on-rails-pro/package.json line 63
# Then:
cd packages/react-on-rails-pro
pnpm install

2. MEDIUM PRIORITY - Add Security Test

Consider adding a regression test for cyclic promise handling:

// packages/react-on-rails-pro/tests/security.test.js
describe('Security - CVE-2025-55184/67779', () => {
  it('should reject cyclic thenables', async () => {
    // Create cyclic promise structure
    const cyclic = {};
    cyclic.then = () => cyclic;
    
    // Should reject instead of hanging
    await expect(handleServerResponse(cyclic))
      .rejects.toThrow('Cannot have cyclic thenables');
  });
});

Note: This may require mocking react-on-rails-rsc internals.

3. LOW PRIORITY - Document Security Practices

Add a security policy mentioning rapid patching for CVEs:

# SECURITY.md

## Security Vulnerability Response

We take security seriously and aim to patch critical vulnerabilities within 48 hours of disclosure.

### Dependency Monitoring
- React/React-DOM: We track React security advisories and upgrade promptly
- react-on-rails-rsc: Security patches are expedited

### Reporting
Report security issues to: [security email]

Summary

LGTM - Approved with minor recommendations

This is an excellent security patch:

  • All three CVEs properly mitigated
  • Dependencies upgraded consistently
  • Documentation is thorough
  • Follows project conventions perfectly

Only issue: Peer dependency allows vulnerable 19.0.2 (easily fixable)

Commit message quality: ✅ Clear and follows project standards

Risk assessment: LOW - This is a security patch with no API changes. The lockfile pins ensure production safety even with the peer dependency issue.


Quick Stats

  • Files changed: 8 (all package manifests and lockfiles)
  • Lines added: 150
  • Lines removed: 137
  • Net change: +13 lines
  • Security fixes: 3 CVEs
  • Breaking changes: None

Great work addressing these vulnerabilities promptly! 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant