October 23, 2026
How can a zero width character leads to privilege escalation
Whoami??

By Tomahawk
3 min read
Whoami??
hey friends back again with a new bug that i hope it will like you i'm youssef(tomahawk0ctf) a security researcher and a part time bug bounty hunter with my small knowledge i could bypass a server-side validation and get a privilege escalation
intro:
in the SAAS websites you will always have a big attack surface so i will show you a bug on the invitation the target was have 4 rules: . owner . admin . manager . member
the admin can do anything but the member and the manager has some restrictions like: . member can't invite any user . manager can just invite members . admin can invite any role
so that i see that as a attack surface also for testing to make a admin that downgraded the privilege to member to back again to admin and same thing for the manager but back again with a manager role
1. Bypassing the Self-Invitation Restriction
The application prevents users from inviting their own email address through its normal invitation workflow.
However, inserting a U+200B ZERO WIDTH SPACE (https://unicode-explorer.com/c/200B)character into the email input allows the self-invitation restriction to be bypassed. The application accepts the invitation request and creates an invitation associated with the user's account.
This behavior suggests that the application does not consistently handle different representations of an email address across its validation, duplicate-checking, and invitation-processing logic.
The invitation can then be retained without redeeming it immediately.
How This Happens
The attack involves two related behaviors: bypassing the self-invitation restriction and reusing an invitation after the account's authorization state changes.
- Initial state: A user has the
Adminrole in a workspace. - Create a self-invitation: The application normally rejects invitations targeting the user's own email address. However, inserting a
U+200B ZERO WIDTH SPACEcharacter into the email input allows the invitation request to be accepted. - Retain the invitation: The user leaves the invitation unused while it remains available for redemption.
- Role downgrade: The workspace owner deliberately changes the user's role from
AdmintoMember. - Redeem the old invitation: The user redeems the invitation created before the downgrade.
- Restore privileges: The application restores the user's previous
Adminprivileges without a new approval from the workspace owner.
A related scenario occurs when a user is removed from a workspace but can subsequently regain membership by redeeming an invitation that was created beforehand.
Why Does the Backend Accept This Bypass?
The observed behavior suggests that the application may not consistently validate email identity across its invitation workflow.
When a backend checks whether an invitation targets the current user's own email address, it must compare the underlying identity reliably rather than relying solely on the submitted email string.
A possible explanation for the observed bypass is inconsistent input canonicalization:
- The backend receives an email address containing a zero-width Unicode character.
- The self-invitation or duplicate-invitation check evaluates the supplied string without applying the same canonicalization used elsewhere in the application.
- Because the resulting string differs from the stored email representation, the restriction may not match the existing account.
- The invitation request is accepted, even though the resulting invitation can later be associated with the same account.
This is a plausible explanation based on the observed behavior; confirming the exact root cause would require examining the backend implementation or additional evidence about how the application processes the email address.
There is also a separate authorization concern. When the invitation is redeemed, the application appears to allow an invitation created under an earlier authorization state to restore the account's former role. This suggests that the redemption workflow may not sufficiently revalidate the invitation against the user's current membership and permissions.
In other words, the first weakness concerns how the invitation is created, while the second concerns whether it remains valid after the account's authorization state changes.
2. Reusing an Invitation After a Role Change
Consider a workspace in which a user initially has the Admin role.
- The user creates a self-invitation by bypassing the application's restriction.
- The workspace owner later downgrades the user's role from
AdmintoMember. - The user redeems the previously created invitation.
- The application restores the user's former
Adminprivileges without requiring a new authorization decision from the workspace owner.
The same underlying issue can also affect membership revocation: an invitation created before a user is removed may remain usable to regain workspace membership.
Conclusion
hope u found this useful just as a question pray for me i had a surgery on my knee don't forget to take a look on my old wirteups