[AppSecAI Agent] webpack-dev-server vulnerable to cross-site request forgery via internal developer endpoints - #646
Open
conviso-platform-appsec-staging[bot] wants to merge 1 commit into
Conversation
…nternal developer endpoints (Conviso Issue 1713858)
Conviso Security Gate — No Security Gate rule configuredNo No new findings were introduced by this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AppSecAI Agent
Issue ID: 1713858
Title: webpack-dev-server vulnerable to cross-site request forgery via internal developer endpoints
Severity: MEDIUM
Type: ScaFinding
Description
Impact
The internal
/webpack-dev-server/open-editorand/webpack-dev-server/invalidateendpoints perform state-changing actions on anyGETrequest, without verifying that the request originated from the dev server's own page. Any website a developer visits while the dev server is running can trigger them cross-origin with no interaction beyond the visit.An attacker can open an arbitrary existing local file in the developer's editor, including files outside the project root (e.g.
~/.ssh/config). The file's contents are not returned to the attacker. Repeated requests can also spawn editor processes and force recompilations, degrading the developer's machine.Patches
Fixed in
webpack-dev-server5.2.6 by rejecting cross-site requests to the/webpack-dev-server/open-editorand/webpack-dev-server/invalidateendpoints (see PR #5698).Workarounds
None
Fix Details
Security Fix: Upgrade webpack-dev-server to resolve CSRF vulnerability
Summary
This PR addresses a medium-severity security vulnerability in
webpack-dev-server(CVE affecting versions prior to 5.2.6) by adding a resolution to enforce the use of a patched version.Vulnerability Details
webpack-dev-serverDescription
The internal
/webpack-dev-server/open-editorand/webpack-dev-server/invalidateendpoints inwebpack-dev-serverperformed state-changing actions on anyGETrequest without verifying that the request originated from the dev server's own page. This allowed any website a developer visits while the dev server is running to trigger these endpoints cross-origin with no interaction beyond the visit.Impact:
~/.ssh/config)Fix
Added
"webpack-dev-server": ">=5.2.6"to theresolutionsfield inpackage.json. This ensures that any transitive dependency onwebpack-dev-server(pulled in via@docusaurus/coreor other packages) will use version 5.2.6 or later, which rejects cross-site requests to the vulnerable endpoints.The fix in
webpack-dev-server5.2.6 (PR #5698) adds origin validation to reject cross-site requests to the/webpack-dev-server/open-editorand/webpack-dev-server/invalidateendpoints.This PR was automatically created by Conviso Platform Auto-Fix.