runtimesandbox 174 Posted 2 hours ago Posted 2 hours ago Please key the public image routes on an unguessable identifier (a per-item UUID) instead of the sequential numeric item ID, so anyone who can reach a server can't walk through every item in its library unauthenticated. Image routes answer without authentication, and they are addressed by the item's numeric ID, which increments by one for each new item. For example, this returns a poster to anyone who can reach the server: GET https://emby.example.com/emby/Items/7658483/Images/Primary?maxHeight=300&maxWidth=200 I understand why images are public: Chromecast receivers, DLNA renderers, notification services and <img> tags fetch them without sending a token. The issue is not the lack of auth on its own. It is that the identifier is predictable, so 7658482, 7658481 and so on can be requested in a loop. The tag parameter isn't required, so knowing the ID is enough. This would in my opinion be a useful security hardening feature, Library disclosure. Walking the ID range returns every poster, backdrop and person image on the server. That's effectively a list of what the library holds, available to anyone who knows the hostname, with no account. Finding valid targets. Unauthenticated item-scoped routes need a real item ID. The subtitle route in GHSA-vfxf-qh5w-fjfw (/Videos/{Id}/{MediaSourceId}/Subtitles/{Index}/Stream.{Format}) is one. Sequential IDs make finding a valid one trivial, and an image request confirms which IDs exist. Unguessable IDs would raise the bar for the next bug of that kind too, not just this one. Hard to fix at a reverse proxy. A proxy can't tell a legitimate image request from an enumeration attempt, because both look identical. Potential solutions: Address images by a per-item UUID. Add a random, non-sequential identifier for each item and use it in image URLs returned by the API, for example /Items/3f2a9c1e-5b7d-4e8a-9c21-7d4e5f6a8b90/Images/Primary. Clients already take image URLs or IDs from API responses, so most would need no change beyond using the new field. Stop serving images by numeric ID to unauthenticated requests, behind a server option at first. Authenticated requests could keep using numeric IDs, so nothing breaks for signed-in clients. A cheaper alternative, if a new identifier is too large a change: require a matching tag on unauthenticated image requests. The tag (for example 5c4331c3563c312c80d6e84a44d64549_639310459363982050) is already in every API response that carries an image and can't be guessed. The server would answer 404 when it's missing or doesn't match the current image. This stops enumeration without new IDs, and has the side benefit that clients always get fresh artwork when the image changes. It would also help to have an opt-in "require authentication for images" setting, for servers whose clients all send tokens.
Solution ebr 17111 Posted 1 hour ago Solution Posted 1 hour ago Hi. What version of the server are you on?
runtimesandbox 174 Posted 1 hour ago Author Posted 1 hour ago I'm on Version 4.11.0.13 beta Thanks for the link, i had missed this! 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now