Repository navigation
fix(agent-toolkit): close create_form_submission SSRF and remove passwords from WorkForms tools (5.80.4) - #582
Open
shay-alaluf wants to merge 2 commits into
Conversation
…words from WorkForms tools (5.80.4) - create_form_submission: parse form_token with new URL(); only request https://wkf.ms (exact host, no credentials/port), 5s timeout, Location only parsed, resolved token must match [A-Za-z0-9_-]+ - BREAKING: remove `password` (create_form_submission) and `setFormPassword`/`formPassword` (update_form); disabling the password still works - regenerate GraphQL types Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
shay-alaluf
force-pushed
the
fix/workforms-mcp-directory-review-b
branch
from
December 2, 2026 12:10
d67ba13 to
a149874
Compare
This branch has not been deployed
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.
Problem
An MCP directory review flagged two things in the WorkForms tools:
create_form_submissiontreatedform_tokenas a short link whenever it contained the textwkf.ms, then sent a HEAD request to the whole value.https://evil.com/wkf.msorhttp://169.254.169.254/?wkf.msmade the server request an attacker-chosen address.create_form_submissiontook apasswordandupdate_formhad asetFormPasswordaction.Changes
SSRF (
create_form_submission)new URL()in try/catch; no substring checks.https://wkf.ms/...: hostname exactlywkf.ms(case-insensitive), no username/password, no explicit port.maxRedirects: 0kept, 5000 ms timeout added.Locationheader is parsed withnew URL(location, shortLinkUrl)and never requested. Relative values resolve against the short link./forms/<token>.^[A-Za-z0-9_-]+$(formTokenSchema), otherwise the existing "Could not resolve a WorkForm token" message is returned with no API call. Theform_tokeninput type is unchanged (description updated).Passwords (BREAKING)
create_form_submission:passwordparameter and the$passwordmutation variable removed. The "not found or not accepting submissions" message now says password-protected forms can't be submitted through this tool and the user should open the form link.update_form:setFormPasswordaction,formPasswordparameter and handler removed, along with the unused mutation and description constants. Turning the password off (features.password.enabled: false) still works;passwordEnablednow says a password is set in the WorkForms UI.yarn codegen); the diff only drops the removed pieces.Behaviour that differs for previously valid input
Location) with characters outside[A-Za-z0-9_-], e.g. percent-encoded, are now rejected.form_tokenis trimmed of surrounding whitespace.http://wkf.ms/..., orwkf.mswith a port or credentials, is no longer requested./forms/.passwordorsetFormPasswordnow get an invalid-arguments error.Testing
jestonworkforms-tools: 3 suites, 136 tests pass. New: rejected hosts/forms (evil.com/wkf.ms,wkf.ms.evil.com,http://169.254.169.254/?wkf.ms,wkf.ms@evil.com, http, port, credentials, ftp, garbage) with no HEAD and no API call; case-insensitive host; relative and unparseableLocation; illegal token characters; JSON schemas of both tools have nopassword/formPasswordand nosetFormPasswordaction; disabling the password still works.tsc --noEmitandeslint: clean.prettier --checkfails only oncreate-submission-tool/schema.ts, which already failed on master; no formatting-only changes made.Not in this PR
features.password.enabledstill acceptstruein the schema despite the "can only be set to false" description (pre-existing). TheMISSING_DESCRIPTION_ALLOWLISTcleanup inplatform-mcp-gatewayfollows the release.🤖 Generated with Claude Code