You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A session can be created by any signed-in user without extra permissions (Privileges Required: Low). If an attacker injects a malicious client name, it can trigger XSS when an admin visits the Listening Session view (/audiobookshelf/config/sessions/). Since this view is likely to be visited, the chance that the injection will run is high. This can be used to extract tokens or user objects.
As a user that can visit this page always is admin or higher this gives the attacker an admin account to inject with a 100% success rate, once the injection runs.
Details
This works at least in the session view (/audiobookshelf/config/sessions/) and the user view (/audiobookshelf/config/users/<>/sessions).
Note
It was also found that if a user was issued an API token but was later disabled, the API token is still valid and can still be used to create a session. Since issuing an API token is an admin task, this is out of scope for this report, but it should be noted that this behavior exists. This means that even disabled users with a non-expired API key can escalate privileges and even re-enable themselves this way.
This gives every user of an ABS server a realistic chance of a complete takeover. A user could also send an admin a valid and harmless-looking link to the session screen (which indeed is just completely normal), which could trigger this. If done well, it should be possible to keep it fully invisible to the user attacked.
This impacts confidentiality, and also integrity and availability, since the attacker effectively gains a privilege escalation at that point.
Summary
A session can be created by any signed-in user without extra permissions (Privileges Required: Low). If an attacker injects a malicious client name, it can trigger XSS when an admin visits the Listening Session view (
/audiobookshelf/config/sessions/). Since this view is likely to be visited, the chance that the injection will run is high. This can be used to extract tokens or user objects.As a user that can visit this page always is admin or higher this gives the attacker an admin account to inject with a 100% success rate, once the injection runs.
Details
This works at least in the session view (
/audiobookshelf/config/sessions/) and the user view (/audiobookshelf/config/users/<>/sessions).Note
It was also found that if a user was issued an API token but was later disabled, the API token is still valid and can still be used to create a session. Since issuing an API token is an admin task, this is out of scope for this report, but it should be noted that this behavior exists. This means that even disabled users with a non-expired API key can escalate privileges and even re-enable themselves this way.
This also affects "guest" user types.
PoC
Impact
This gives every user of an ABS server a realistic chance of a complete takeover. A user could also send an admin a valid and harmless-looking link to the session screen (which indeed is just completely normal), which could trigger this. If done well, it should be possible to keep it fully invisible to the user attacked.
This impacts confidentiality, and also integrity and availability, since the attacker effectively gains a privilege escalation at that point.
Affected areas
audiobookshelf/client/pages/config/users/_id/sessions.vue
Line 41 in e6d49a2
audiobookshelf/client/pages/config/sessions.vue
Line 69 in e6d49a2
audiobookshelf/client/pages/config/sessions.vue
Line 133 in e6d49a2