Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata: Upgrade Exiftool to fix security issue #1302

Closed
testanull opened this issue May 19, 2021 · 13 comments
Closed

Metadata: Upgrade Exiftool to fix security issue #1302

testanull opened this issue May 19, 2021 · 13 comments
Assignees
Labels
bug Something isn't working released Available in the stable release

Comments

@testanull
Copy link

CVE-2021-22204 is a critical RCE in ExifTool (ref: https://devcraft.io/2021/05/04/exiftool-arbitrary-code-execution-cve-2021-22204.html), It can be easily triggered just by parsing an image (ex: exftool foo.jpg)

I found Photoprism is using ExifTool while importing image after uploading, and also succeeded in confirm the vulnerability in Photoprism demo page

Please do something to fix this vuln,

@lastzero
Copy link
Member

Already working on it: https://ubuntu.com/security/CVE-2021-22204

@lastzero
Copy link
Member

You can help by telling the Ubuntu team how important that is to you.

@lastzero
Copy link
Member

In the meantime, you may disable Exiftool in the Advanced Settings and restart PhotoPrism:

https://demo.photoprism.org/settings/advanced

@lastzero
Copy link
Member

Our latest Docker image comes with the (hopefully) fixed version while everyone's waiting for an official update via apt:

apt show libimage-exiftool-perl 
Package: libimage-exiftool-perl
Version: 12.16+dfsg-2
Status: install ok installed
Priority: optional
Section: perl

Give us a few minutes to build a new release and upload the images.

@lastzero lastzero self-assigned this May 19, 2021
@lastzero lastzero added bug Something isn't working in-progress Somebody is working on this labels May 19, 2021
@lastzero lastzero changed the title Insecure usage of Exiftool (CVE-2021-22204) Upgrade Exiftool to fix security issue May 19, 2021
@lastzero
Copy link
Member

@lastzero
Copy link
Member

Note that allowing public uploads (like we do on our demo) is a generally bad idea in terms of security as we have a very long list of supported formats. Safe to assume some libs needed to read those contain currently unknown security issues. Besides exploits, uploads may also contain copyrighted material or pornography. For the same reason, you shouldn't open email attachments from strangers and don't use a virus-scanner that does so automatically: Exploiting its parsers is a common attack vector. In a later release, we may try to wrap external tools for added security (help welcome).

@lastzero lastzero changed the title Upgrade Exiftool to fix security issue Metadata: Upgrade Exiftool to fix security issue May 19, 2021
@lastzero lastzero added please-test Ready for acceptance test and removed in-progress Somebody is working on this labels May 19, 2021
@lastzero
Copy link
Member

Released: https://github.com/photoprism/photoprism/releases/tag/210519-24b5c7e6

@testanull Can you test again, please? Our demo is already updated. Happens automatically.

@testanull
Copy link
Author

Released: https://github.com/photoprism/photoprism/releases/tag/210519-24b5c7e6

@testanull Can you test again, please? Our demo is already updated. Happens automatically.

I'm having trouble while trying to docker-compose up

No photoprism process is found: image

@lastzero
Copy link
Member

That loos like our development image?

@lastzero lastzero added released Available in the stable release and removed please-test Ready for acceptance test labels May 20, 2021
@lastzero
Copy link
Member

Added a security policy to our Developer Guide:

https://docs.photoprism.org/developer-guide/security/policy/

@graciousgrey
Copy link
Member

@testanull We just switched from our manual fix to the official fix from ubuntu. Could you test it again?

@testanull
Copy link
Author

Sorry, I've already removed the PoC and the lab

@lastzero
Copy link
Member

Maybe someone else can test it for us? Would be super helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in the stable release
Projects
Status: Released 🌈
Development

No branches or pull requests

3 participants