# Update base image for polkit vulnerability

**URL:** https://meta.discourse.org/t/update-base-image-for-polkit-vulnerability/216305
**Category:** Support
**Created:** [January 28, 2022, 12:48pm UTC](https://meta.discourse.org/t/update-base-image-for-polkit-vulnerability/216305 "2022-01-28T12:48:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [January 28, 2022, 12:48pm UTC](https://meta.discourse.org/t/update-base-image-for-polkit-vulnerability/216305/1 "2022-01-28T12:48:19Z")

</div>

I recognize that Discourse doesn’t directly call `pkexec` but it is present, setuid root, in the base image. At least when I looked yesterday it looked like it was still the vulnerable version. For defense-in-depth, it would be appropriate to update the base image to address CVE-2021-4034 either by updating the software, removing polkit, removing pkexec, or removing the setuid bit from pkexec.

My mitigation has been to add

```plaintext
  - exec: chmod 755 /usr/bin/pkexec

```

to the custom commands block in container definition YAML files.

If I’m wrong and CVE-2021-4034 has been addressed, please accept my apologies, let us know, and the next person who searches for `polkit`, `pkexec`, or `CVE-2021-4034` will find this post. 🙂

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [January 29, 2022, 10:38pm UTC](https://meta.discourse.org/t/update-base-image-for-polkit-vulnerability/216305/2 "2022-01-29T22:38:10Z")

</div>

I’m pretty sure it was mitigated by [DEV: update launcher for new base image and pups gem (#602) · discourse/discourse\_docker@a87474c · GitHub](https://github.com/discourse/discourse_docker/commit/a87474c239f867ecf8f531644410b0a83f755f20). You should get the new image by rebuilding the container and I think we will force a rebuild during updates sometime next week.

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [January 29, 2022, 11:02pm UTC](https://meta.discourse.org/t/update-base-image-for-polkit-vulnerability/216305/3 "2022-01-29T23:02:56Z")

</div>

Thank you! That wasn’t yet available when I tested before I posted, though perhaps it landed between me testing and me posting. 🙄

Rebuilding again now to pick that up.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [February 28, 2022, 11:03pm UTC](https://meta.discourse.org/t/update-base-image-for-polkit-vulnerability/216305/4 "2022-02-28T23:03:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
