Skip to content
Info disclosure Disclosed report Beginner

EXIF metadata not stripped from JPG group logos

When uploading a JPEG image as a group logo on GitLab, the EXIF metadata is not stripped. An attacker could download public group logos and extract sensitive metadata such as the location where the photo was taken.

jackb898 Follow

Originally disclosed on HackerOne

Bounty$500 Low View original
  • Triaged in 2 days
  • Fixed in 5 months
  • Paid in 4 months
  • Disclosed after 22 months

Summary by the program

Note that this report was submitted 2 ago and reports related to EXIF metadata not being stripped aren't accepted anymore. The policy now states:

We are aware of ways to bypass the EXIF metadata stripping and intend to improve this, but we don't consider this impactful enough to be eligible for bounty

Summary by the researcher

I made a short writeup on Exif metadata disclosure on my blog which can be seen here. Thank you to the Hackerone triagers and Gitlab team for a smooth reporting process and resolution.

The report

Summary: When uploading JPEG images as group logos on Gitlab, the EXIF metadata is not removed or changed in any way.

Description: When setting up a group on Gitlab, you can upload a logo, and if you upload a JPEG with EXIF metadata on it, it isn't stripped. This can lead to disclosure of location where photo was taken or other personal information by the photo uploader if their group is public, as anyone can download the logo and check the metadata.

Steps To Reproduce:

  1. Upload a testing image w any EXIF tags filled in (you can test with the attached download.jpg image on this report)
  2. Make the group public
  3. Visit the group page unauthenticated and download the image
  4. Use Windows properties tool or any EXIF viewer, check the metadata. Whatever was there when uploaded should be there when downloaded, including the exact file name (though the file name part isn't an actual reportable problem, it's good practice to just encode/make it a random file name in case the user uploading forgets to remove personal information in the file name)

PoC

Check out my group: https://gitlab.com/gthgh Try downloading the logo. The metadata for it should show "egginfo" under Copyright.

Impact

An attacker could download public group logos and find sensitive metadata. Some phones attach metadata with the latitude/longitude of where the photo was taken which could leak important information, and it's just best practice as well to strip all metadata from images when uploaded.

Attachments

download.jpg
download.jpg From the original on HackerOne

The original report as published on HackerOne, by jackb898. 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. 6 min read.

Context

GitLab groups can be given a logo image, and that logo is displayed on the group page. When a group is public, anyone, authenticated or not, can view the group page and download the logo file. The expectation for a feature like this is that uploaded images are processed on the server: re-encoded, resized, or at least cleaned of embedded metadata, so that nothing the uploader did not intend to publish travels with the file.

This report is about JPEG group logos. JPEG files can carry EXIF metadata: camera make and model, timestamps, software, copyright fields, and, on many phones, GPS coordinates for where the photo was taken. If that metadata survives the upload and is served back with the logo, it is readable by anyone who downloads the image.

The report was filed against GitLab on HackerOne by jackb898, rated low severity as an information disclosure, and paid a 500 USD bounty. It was disclosed on 8 September 2020. The program's summary notes that the report was submitted some time ago and that reports about EXIF metadata not being stripped are no longer accepted; the policy now states:

We are aware of ways to bypass the EXIF metadata stripping and intend to improve this, but we don't consider this impactful enough to be eligible for bounty

That context matters for anyone reading the report today: the behaviour described here was real, but the program has since classified it as out of scope for bounty.

Setup

No special tooling is required. The researcher used a JPEG with EXIF tags filled in, attached to the report as download.jpg, and an EXIF viewer, with the Windows file properties dialog named as one option. The only precondition is the ability to create a group and set its logo, plus the ability to make that group public so the logo can be fetched without authentication.

Finding it

The observation is simple: when a JPEG is uploaded as a group logo, the EXIF metadata is not removed or changed in any way. The file that comes back down is, metadata-wise, the file that went up. The researcher also noted that the original file name is preserved, which is not treated as a reportable problem in itself but is called out as bad practice, since a file name can itself contain personal information the uploader forgot to remove.

What makes this worth reporting is the combination of two properties: the group is public, so the logo is downloadable by anyone, and the metadata is intact, so the download leaks whatever the uploader's camera or editing software wrote into the file.

Exploitation

Step 1: Upload a JPEG with EXIF tags

Create or edit a group and set its logo to a JPEG that has EXIF tags populated. The researcher's own test file is attached to the report:

download.jpg
download.jpg From the original on HackerOne

The image is the test JPEG used for the upload, with EXIF fields filled in so that the result of the round trip is visible.

Step 2: Make the group public

Change the group's visibility so that its page, and therefore its logo, is reachable without logging in. This is the condition that turns a metadata leak into a disclosure to anyone on the internet.

Step 3: Download the logo unauthenticated

Visit the group page while logged out and download the logo image. No account, token or special header is needed; the logo is served as part of the public group page.

Step 4: Inspect the metadata

Open the downloaded file in an EXIF viewer, or in the Windows file properties dialog, and compare it with the original. Whatever was present at upload time is present after download, including the exact file name. The researcher's proof of concept is a public group:

Text
https://gitlab.com/gthgh

Downloading the logo from that group and checking its metadata shows egginfo under the Copyright field, which is the value that was set in the uploaded file. That single field is enough to demonstrate the round trip: a value chosen by the uploader, invisible in the rendered page, readable by anyone who downloads the image.

Root cause

The observable behaviour is that the EXIF metadata is not removed or changed on upload. Because the file is not rewritten, every EXIF field, including GPS coordinates where present, survives. The report does not describe the server-side implementation, so the exact point at which processing is skipped is not stated; what is established is the observable behaviour, that metadata is neither removed nor changed.

Existing defences did not help here because the exposure does not depend on a vulnerability in access control: the group is intentionally public, and the logo is intentionally downloadable.

Impact

An attacker can download public group logos and read whatever metadata the uploader's device or software embedded. The researcher highlights location: some phones attach latitude and longitude for where the photo was taken, which can leak important information about the uploader. Other personal information in EXIF fields is exposed in the same way. The original file name is also preserved, which the researcher explicitly does not treat as a reportable problem but recommends handling anyway.

The conditions are narrow: the group must be public, and the uploader must have uploaded a JPEG that still carries metadata. The impact falls on whoever uploaded the logo, not on GitLab's own data. The program's later position is that bypasses of EXIF stripping exist and are known, and that this class is not considered impactful enough to be eligible for bounty.

Fix

The report does not describe the resolution in technical terms. The researcher thanks the HackerOne triagers and the GitLab team for a smooth reporting process and resolution, but what changed is not stated. The recommendation in the report itself is to strip all metadata from images on upload, and to encode or randomise the stored file name so that personal information in the original name is not carried over.

Variants to test

  1. Other image-bearing features: avatars, project logos, issue and merge request attachments, wiki images, and CI artefacts served publicly. Upload a JPEG with a distinctive Copyright value and a GPS tag, then fetch it back unauthenticated and check whether the value survives.
  2. Other formats: PNG text chunks, WebP EXIF/XMP, TIFF, and PDF metadata. A positive result is any uploader-controlled field readable in the downloaded file.
  3. Derived sizes: many applications generate thumbnails or resized variants. Check every variant served, not just the original, since one path may re-encode while another copies the source.
  4. File name handling: upload a file whose name contains a marker string and see whether the stored or served name preserves it.
  5. Visibility transitions: upload while private, then make the resource public, and confirm whether the metadata is still present in the public copy.

Hunting notes

This class of bug hides wherever user-supplied images are stored and served without re-encoding: profile and group images, attachment previews, public shares, and any feature where a file uploaded in a private context later becomes reachable by others. During recon, the signal is a public page that serves an image file directly, with the original bytes and often the original file name, rather than a processed derivative. Downloading a handful of such images and running an EXIF reader over them is cheap and immediately conclusive.

Proving impact is the hard part, and this report shows both sides of it. The demonstration is minimal and clear: a public group, a downloaded logo, and a Copyright value that matches what was uploaded. But the program ultimately decided that this class of finding, including known ways to bypass metadata stripping, is not impactful enough for bounty.

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. 10 min read.

What happened, in plain words

GitLab lets a team create a group, and a group can have a logo image. When a group is public, anyone on the internet can open its page and download that logo, no account needed. The expectation is that when you upload an image, the server does something sensible with it: resizes it, re-saves it, or at least removes the hidden information that cameras and phones write into photo files. That hidden information is called EXIF metadata, and it can include the make and model of the camera, the date and time, the software used, a copyright line, and on many phones the GPS coordinates of where the photo was taken.

In this report, the researcher found that a JPEG uploaded as a group logo kept all of its EXIF metadata. The file that came back down was, metadata-wise, the file that went up. Because the group was public, anyone could download the logo and read whatever the uploader's camera or editing software had written into it, including, potentially, the place where the photo was taken.

The report was filed against GitLab on HackerOne by jackb898, rated low severity as an information disclosure, and paid a 500 USD bounty. It was disclosed on 8 September 2020. The program's summary notes that the report was submitted some time ago and that reports about EXIF metadata not being stripped are no longer accepted; the policy now states:

We are aware of ways to bypass the EXIF metadata stripping and intend to improve this, but we don't consider this impactful enough to be eligible for bounty

That matters if you are reading this today: the behaviour described here was real, but the program has since decided this kind of finding is out of scope for a bounty.

Background: the pieces you need to know

Before walking through the steps, here are the concepts the report relies on, explained from scratch.

  • GitLab and groups. GitLab is a website where teams keep code and work on projects together. A group is a container that holds several projects and members. Each group has a page, and that page can show a logo, a small image that identifies the group.
  • Public versus private. A group can be set to public, meaning anyone, even someone who is not logged in, can view its page. A private group is only visible to its members. This distinction is the whole reason the finding matters: a public logo can be downloaded by a stranger.
  • JPEG and EXIF metadata. JPEG is a common image file format, the kind of file a phone camera produces. Inside a JPEG file there is not only the picture but also a block of extra information called EXIF metadata: text fields describing the photo. Think of it like the label on the back of a printed photograph, listing the camera, the date, and where it was taken. The label travels with the photo unless someone peels it off.
  • Stripping metadata. When a website accepts an image upload, a careful implementation re-saves the image (re-encodes it) or explicitly deletes the metadata block. That process is called stripping. If the site simply stores the original file and hands it back later, the metadata survives untouched.
  • Information disclosure. This is the name for a bug where something that should have stayed hidden becomes readable by someone who should not see it. Here, the hidden thing is the metadata inside the image file.
  • EXIF viewer. A program, or a built-in feature of your operating system, that reads and displays the metadata fields inside an image. On Windows, right-clicking a file and opening its Properties shows some of these fields. That is enough to check whether metadata survived.
  • Authentication. Being logged in. A request made without logging in is unauthenticated. The researcher deliberately checked the logo while logged out, because that proves any stranger can do the same.

Setup

No special tooling is required. The researcher used a JPEG with EXIF tags filled in, attached to the report as download.jpg, and an EXIF viewer, with the Windows file properties dialog named as one option. The only precondition is the ability to create a group and set its logo, plus the ability to make that group public so the logo can be fetched without logging in.

Finding it

The observation is simple: when a JPEG is uploaded as a group logo, the EXIF metadata is not removed or changed in any way. The file that comes back down is, metadata-wise, the file that went up. The researcher also noted that the original file name is preserved, which is not treated as a reportable problem in itself but is called out as bad practice, since a file name can itself contain personal information the uploader forgot to remove.

What makes this worth reporting is the combination of two properties: the group is public, so the logo is downloadable by anyone, and the metadata is intact, so the download leaks whatever the uploader's camera or editing software wrote into the file.

Exploitation

Step 1: Upload a JPEG with EXIF tags

Create or edit a group and set its logo to a JPEG that has EXIF tags populated. The researcher's own test file is attached to the report:

download.jpg
download.jpg From the original on HackerOne

The image is the test JPEG used for the upload, with EXIF fields filled in so that the result of the round trip is visible. In other words, the researcher prepared a photo whose metadata contained known values, so that after uploading and downloading it, they could compare the two and see whether anything had been removed.

Step 2: Make the group public

Change the group's visibility so that its page, and therefore its logo, is reachable without logging in. This is the condition that turns a metadata leak into a disclosure to anyone on the internet. If the group stayed private, only members could download the logo, and the exposure would be much smaller.

Step 3: Download the logo unauthenticated

Visit the group page while logged out and download the logo image. No account, token or special header is needed; the logo is served as part of the public group page. Doing this while logged out is the proof: it shows that a stranger with a browser can get the file, not just a trusted member.

Step 4: Inspect the metadata

Open the downloaded file in an EXIF viewer, or in the Windows file properties dialog, and compare it with the original. Whatever was present at upload time is present after download, including the exact file name. The researcher's proof of concept is a public group:

Text
https://gitlab.com/gthgh

This is simply the address of a group the researcher created for the test. Opening it in a browser shows the group page with its logo. Downloading that logo and checking its metadata shows egginfo under the Copyright field, which is the value that was set in the uploaded file. That single field is enough to demonstrate the round trip: a value chosen by the uploader, invisible in the rendered page, readable by anyone who downloads the image. You would not see egginfo anywhere on the page itself; it only appears when you look inside the file.

Root cause

The observable behaviour is that the EXIF metadata is not removed or changed on upload. Because the file is not rewritten, every EXIF field, including GPS coordinates where present, survives. The report does not describe the server-side implementation, so the exact point at which processing is skipped is not stated; what is established is the observable behaviour, that metadata is neither removed nor changed.

Existing defences did not help here because the exposure does not depend on a vulnerability in access control: the group is intentionally public, and the logo is intentionally downloadable.

Impact

An attacker can download public group logos and read whatever metadata the uploader's device or software embedded. The researcher highlights location: some phones attach latitude and longitude for where the photo was taken, which can leak important information about the uploader. Other personal information in EXIF fields is exposed in the same way. The original file name is also preserved, which the researcher explicitly does not treat as a reportable problem but recommends handling anyway.

The conditions are narrow: the group must be public, and the uploader must have uploaded a JPEG that still carries metadata. The impact falls on whoever uploaded the logo, not on GitLab's own data. The program's later position is that bypasses of EXIF stripping exist and are known, and that this class is not considered impactful enough to be eligible for bounty.

Fix

The report does not describe the resolution in technical terms. The researcher thanks the HackerOne triagers and the GitLab team for a smooth reporting process and resolution, but what changed is not stated. The recommendation in the report itself is to strip all metadata from images on upload, and to encode or randomise the stored file name so that personal information in the original name is not carried over.

Variants to test

If you want to look for the same kind of issue elsewhere, these are the places to check. Each one is a different feature that accepts an image and later serves it back.

  1. Other image-bearing features: avatars, project logos, issue and merge request attachments, wiki images, and CI artefacts served publicly. Upload a JPEG with a distinctive Copyright value and a GPS tag, then fetch it back unauthenticated and check whether the value survives.
  2. Other formats: PNG text chunks, WebP EXIF/XMP, TIFF, and PDF metadata. A positive result is any uploader-controlled field readable in the downloaded file.
  3. Derived sizes: many applications generate thumbnails or resized variants. Check every variant served, not just the original, since one path may re-encode while another copies the source.
  4. File name handling: upload a file whose name contains a marker string and see whether the stored or served name preserves it.
  5. Visibility transitions: upload while private, then make the resource public, and confirm whether the metadata is still present in the public copy.

Hunting notes

This class of bug hides wherever user-supplied images are stored and served without re-encoding: profile and group images, attachment previews, public shares, and any feature where a file uploaded in a private context later becomes reachable by others. During recon, the signal is a public page that serves an image file directly, with the original bytes and often the original file name, rather than a processed derivative. Downloading a handful of such images and running an EXIF reader over them is cheap and immediately conclusive.

Proving impact is the hard part, and this report shows both sides of it. The demonstration is minimal and clear: a public group, a downloaded logo, and a Copyright value that matches what was uploaded. But the program ultimately decided that this class of finding, including known ways to bypass metadata stripping, is not impactful enough for bounty.

Glossary

  • Authentication: proving who you are, usually by logging in.
  • Bounty: a reward, often money, paid by a company to someone who reports a security problem to it.
  • CI artefacts: files produced by an automated build or test system and kept so people can download them.
  • Copyright field: one of the text fields inside EXIF metadata, meant to record who owns the image.
  • Derivative: a version of an image produced by processing it, such as a resized copy or a thumbnail.
  • EXIF metadata: extra information stored inside an image file, such as camera model, date, software, copyright and GPS coordinates.
  • EXIF viewer: a tool that reads and displays the EXIF metadata inside an image file.
  • GPS coordinates: numbers giving a precise location on Earth, which many phones write into photos when they are taken.
  • Group: in GitLab, a container that holds several projects and their members, and which can have its own logo and visibility setting.
  • HackerOne: a website where security researchers report bugs to companies and companies manage those reports.
  • Information disclosure: a bug where information that should have stayed hidden becomes readable by someone who should not see it.
  • JPEG: a common image file format, typically produced by cameras and phones.
  • Logo: a small image used to identify a group or project on its page.
  • Metadata: data about data; here, the descriptive fields stored inside an image file alongside the picture itself.
  • PNG text chunks: named text fields that can be stored inside a PNG image file, the PNG equivalent of EXIF fields.
  • Private group: a group whose page is only visible to its members.
  • Public group: a group whose page anyone can view, even without logging in.
  • Re-encode: to read an image and save it again in a new form, which normally discards the original metadata.
  • Recon: short for reconnaissance; the phase of looking around a target to find features worth testing.
  • Severity: a rating of how serious a bug is, often low, medium, high or critical.
  • Stripping: deliberately removing metadata from a file, usually when it is uploaded.
  • Thumbnail: a small resized copy of an image, often generated automatically.
  • TIFF: an image file format that can also carry metadata fields.
  • Token: a short piece of text that proves a request is authorised, like a temporary key. None was needed here because the group was public.
  • WebP: an image file format that can carry EXIF and XMP metadata.
  • XMP: another metadata format, often stored alongside EXIF inside image files.

More by jackb898

View all

9 more disclosed reports, best first.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.