René's URL Explorer Experiment


Title: [BUG] Password-protected deployment auth tokens can be forged · Issue #4759 · simstudioai/sim · GitHub

Open Graph Title: [BUG] Password-protected deployment auth tokens can be forged · Issue #4759 · simstudioai/sim

X Title: [BUG] Password-protected deployment auth tokens can be forged · Issue #4759 · simstudioai/sim

Description: Describe the bug Password-protected chat and form deployments use a base64-encoded authentication token that is not signed or bound to a server-side secret. The token format is: deploymentId:type:timestamp:truncatedPasswordHash The passw...

Open Graph Description: Describe the bug Password-protected chat and form deployments use a base64-encoded authentication token that is not signed or bound to a server-side secret. The token format is: deploymentId:type:t...

X Description: Describe the bug Password-protected chat and form deployments use a base64-encoded authentication token that is not signed or bound to a server-side secret. The token format is: deploymentId:type:t...

Opengraph URL: https://github.com/simstudioai/sim/issues/4759

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] Password-protected deployment auth tokens can be forged","articleBody":"**Describe the bug**\n\nPassword-protected chat and form deployments use a base64-encoded authentication token that is not signed or bound to a server-side secret. The token format is:\n\n```text\ndeploymentId:type:timestamp:truncatedPasswordHash\n```\n\nThe password hash is `sha256(encryptedPassword).substring(0, 8)`, which gives only 32 bits of search space. `validateAuthToken()` accepts any token whose deployment ID matches, whose timestamp is within 24 hours, and whose 8-character password hash matches the current encrypted password value. Because the token is not authenticated with an HMAC/signature, a token can be created outside the server once the 32-bit hash value is guessed.\n\nAffected code:\n\n- `apps/sim/lib/core/security/deployment.ts`\n  - `hashPassword()` truncates SHA-256 to 8 hex characters.\n  - `encryptAuthToken()` returns plain base64 of the token fields.\n  - `validateAuthToken()` validates field equality but does not verify a server-side signature.\n- `apps/sim/app/api/chat/utils.ts`\n  - `validateChatAuth()` trusts `chat_auth_\u003cdeploymentId\u003e` when `validateAuthToken()` returns true.\n- `apps/sim/app/api/form/utils.ts`\n  - `validateFormAuth()` trusts `form_auth_\u003cdeploymentId\u003e` when `validateAuthToken()` returns true.\n- `apps/sim/app/api/chat/[identifier]/route.ts` and `apps/sim/app/api/form/[identifier]/route.ts`\n  - GET handlers return full deployment configuration when the forged cookie validates.\n\nThis was verified on commit `7b572f1f61a8bbcee31fd7389097814a71f8f094` and the same vulnerable implementation is still present in fetched `origin/main` at `e532e0a6da6fd22eee98310ba44e4fe50dec174a`.\n\n**To Reproduce**\n\nUse only a local/synthetic deployment ID and encrypted password value. Do not run this against production systems.\n\n1. Inspect `apps/sim/lib/core/security/deployment.ts`.\n2. Compute the same password hash used by the application:\n\n```js\nconst { createHash } = require('crypto')\nconst encryptedPassword = 'synthetic-encrypted-password-ciphertext'\nconst pwHash = createHash('sha256').update(encryptedPassword).digest('hex').substring(0, 8)\n```\n\n3. Construct a token outside the server:\n\n```js\nconst deploymentId = 'dep_safe_local_test'\nconst token = Buffer.from(`${deploymentId}:password:${Date.now()}:${pwHash}`).toString('base64')\n```\n\n4. Pass the token to the same validation logic:\n\n```js\nvalidateAuthToken(token, deploymentId, encryptedPassword) === true\n```\n\n5. A wrong hash is rejected and an expired timestamp is rejected, confirming that the acceptance condition is exactly the forgeable 8-character hash plus a fresh timestamp.\n\nLocal verification result:\n\n```text\nhash_bits=32\ncandidate_space=4294967296\nforged_fresh_valid=true\nwrong_hash_valid=false\nexpired_valid=false\n```\n\n**Expected behavior**\n\nDeployment authentication cookies should be unforgeable by clients. A token should only validate if it was issued by the server and protected with a server-side secret, such as an HMAC-signed payload, authenticated encrypted token, signed JWT with strict claims, or an opaque server-side session ID.\n\nThe password hash should not be used as a bearer capability. If a stateless token is required, validation should verify a cryptographic signature using constant-time comparison and should bind the token to the deployment ID, auth type, expiration, and any relevant session/version state.\n\n**Screenshots**\n\nNot applicable. The issue is in token construction and validation logic.\n\n**Additional context**\n\nSecurity impact:\n\n- Unauthorized access to password-protected chat/form deployments is possible if an attacker knows the deployment identifier and can find the 32-bit truncated password hash.\n- The public deployment identifier is exposed through deployment URLs.\n- A valid forged cookie can make protected GET routes return full deployment configuration and can allow POST flows to proceed as authenticated.\n- Since the timestamp is client-controlled and only checked for recency, an attacker who finds the hash can mint fresh tokens until the password/encrypted password value changes.\n\nRecommended remediation:\n\n- Replace plain base64 tokens with HMAC-signed tokens or opaque server-side session IDs.\n- Remove the truncated password hash from client-controlled token material.\n- Add rate limiting and monitoring for failed deployment-auth attempts.\n- Consider rotating deployment auth/session material after deploying a fix.\n\nDisclosure note:\n\nThe repository contains `.github/SECURITY.md`, which asks reporters to email `security@sim.ai` and not disclose vulnerabilities publicly. This file follows the repository's bug-report template for private maintainer handling rather than public issue publication.","author":{"url":"https://github.com/3em0","@type":"Person","name":"3em0"},"datePublished":"2026-05-27T12:32:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/4759/sim/issues/4759"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:46af1b13-11de-f362-2fa3-b1bf8f875b86
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCB24:10EC7:FDA03F:15C046F:6A629896
html-safe-nonce4bd1bfb1230385eb4093ee066073d23d9e672881cddb333e55620f275983fb73
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjI0OjEwRUM3OkZEQTAzRjoxNUMwNDZGOjZBNjI5ODk2IiwidmlzaXRvcl9pZCI6IjI0OTEzNDM1OTc3MDA1NTI4NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac87a81d9293c01421f33e3c50029b20c70232caeb0c53b2cca2f9ae1ea3ad7cb0
hovercard-subject-tagissue:4532333574
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/simstudioai/sim/4759/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b8330eef860c3d57c2a69aada1f9c59e8b9a9ce33ff0ed96a2cd0a31b3110a49/simstudioai/sim/issues/4759
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b8330eef860c3d57c2a69aada1f9c59e8b9a9ce33ff0ed96a2cd0a31b3110a49/simstudioai/sim/issues/4759
og:image:altDescribe the bug Password-protected chat and form deployments use a base64-encoded authentication token that is not signed or bound to a server-side secret. The token format is: deploymentId:type:t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:username3em0
hostnamegithub.com
expected-hostnamegithub.com
None10ffaff7e212112a3b4eeb224665f909dff951514db9af4f00de33b681024427
turbo-cache-controlno-preview
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee470e2fc66e1ac7f528caec0fd8825047788d563
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/issues/4759#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fissues%2F4759
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fissues%2F4759
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/issues/4759
Reloadhttps://github.com/simstudioai/sim/issues/4759
Reloadhttps://github.com/simstudioai/sim/issues/4759
Please reload this pagehttps://github.com/simstudioai/sim/issues/4759
simstudioai https://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Notifications https://github.com/login?return_to=%2Fsimstudioai%2Fsim
Fork 3.7k https://github.com/login?return_to=%2Fsimstudioai%2Fsim
Star 29.2k https://github.com/login?return_to=%2Fsimstudioai%2Fsim
Code https://github.com/simstudioai/sim
Issues 110 https://github.com/simstudioai/sim/issues
Pull requests 118 https://github.com/simstudioai/sim/pulls
Actions https://github.com/simstudioai/sim/actions
Projects https://github.com/simstudioai/sim/projects
Security and quality 0 https://github.com/simstudioai/sim/security
Insights https://github.com/simstudioai/sim/pulse
Code https://github.com/simstudioai/sim
Issues https://github.com/simstudioai/sim/issues
Pull requests https://github.com/simstudioai/sim/pulls
Actions https://github.com/simstudioai/sim/actions
Projects https://github.com/simstudioai/sim/projects
Security and quality https://github.com/simstudioai/sim/security
Insights https://github.com/simstudioai/sim/pulse
#4760https://github.com/simstudioai/sim/pull/4760
[BUG] Password-protected deployment auth tokens can be forgedhttps://github.com/simstudioai/sim/issues/4759#top
#4760https://github.com/simstudioai/sim/pull/4760
bugSomething isn't workinghttps://github.com/simstudioai/sim/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/3em0
3em0https://github.com/3em0
on May 27, 2026https://github.com/simstudioai/sim/issues/4759#issue-4532333574
bugSomething isn't workinghttps://github.com/simstudioai/sim/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.