# Kibana Security CVE - Building 8.9.0 docker distributable

**URL:** https://discuss.elastic.co/t/kibana-security-cve-building-8-9-0-docker-distributable/349409
**Category:** Kibana
**Tags:** docker
**Created:** [December 15, 2023, 3:41am UTC](https://discuss.elastic.co/t/kibana-security-cve-building-8-9-0-docker-distributable/349409 "2023-12-15T03:41:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![breno.andrade](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@breno.andrade](https://discuss.elastic.co/u/breno.andrade)
#### Post date: [December 15, 2023, 3:41am UTC](https://discuss.elastic.co/t/kibana-security-cve-building-8-9-0-docker-distributable/349409/1 "2023-12-15T03:41:18Z")

</div>

Hi there,  
Due to a [security fault](https://github.com/elastic/kibana/commit/2365f518cad487cc4042b00aa4c6401cca0552e5), I need to patchback this Kibana 8.11.1 fix:

> <https://github.com/elastic/kibana/commit/2365f518cad487cc4042b00aa4c6401cca0552e5>
>
> \## Summary
> 
> Remove endpoint metadata task logs
> 
> \### Checklist
> 
> Delete any …items that are not applicable to this PR.
> 
> \- \[\] Any text added follows \[EUI's writing
> guidelines\](https://elastic.github.io/eui/#/guidelines/writing), uses
> sentence case text and includes \[i18n
> support\](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
> \- \[\]
> \[Documentation\](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
> was added for features that require explanation or tutorials
> \- \[\] \[Unit or functional
> tests\](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
> were updated or added to match the most common scenarios
> \- \[\] Any UI touched in this PR is usable by keyboard only (learn more
> about \[keyboard accessibility\](https://webaim.org/techniques/keyboard/))
> \- \[\] Any UI touched in this PR does not create any new axe failures
> (run axe in browser:
> \[FF\](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
> \[Chrome\](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
> \- \[\] If a plugin configuration key changed, check if it needs to be
> allowlisted in the cloud and added to the \[docker
> list\](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os\_packages/docker\_generator/resources/base/bin/kibana-docker)
> \- \[\] This renders correctly on smaller devices using a responsive
> layout. (You can test this \[in your
> browser\](https://www.browserstack.com/guide/responsive-testing-on-local-server))
> \- \[\] This was checked for \[cross-browser
> compatibility\](https://www.elastic.co/support/matrix#matrix\_browsers)
> 
> 
> \### Risk Matrix
> 
> Delete this section if it is not applicable to this PR.
> 
> Before closing this PR, invite QA, stakeholders, and other developers to
> identify risks that should be tested prior to the change/feature
> release.
> 
> When forming the risk matrix, consider some of the following examples
> and how they may potentially impact the change:
> 
> | Risk | Probability | Severity | Mitigation/Notes |
> 
> |---------------------------|-------------|----------|-------------------------|
> | Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
> | Low | High | Integration tests will verify that all features are still
> supported in non-default Kibana Space and when user switches between
> spaces. |
> | Multiple nodes&mdash;Elasticsearch polling might have race conditions
> when multiple Kibana nodes are polling for the same tasks. | High | Low
> | Tasks are idempotent, so executing them multiple times will not result
> in logical error, but will degrade performance. To test for this case we
> add plenty of unit tests around this logic and document manual testing
> procedure. |
> | Code should gracefully handle cases when feature X or plugin Y are
> disabled. | Medium | High | Unit tests will verify that any feature flag
> or plugin combination still results in our service operational. |
> | \[See more potential risk
> examples\](https://github.com/elastic/kibana/blob/main/RISK\_MATRIX.mdx) |
> 
> 
> \### For maintainers
> 
> \- \[\] This was checked for breaking API changes and was \[labeled
> appropriately\](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
> 
> \---------
> 
> Co-authored-by: kibanamachine \<42973632+kibanamachine@users.noreply.github.com\>

The product is already shipped and we can't upversion to 8.11.1 at this moment so we want to manage our own Kibana 8.9.0 build with this fix.  
The issue is that when I try to run `yarn kbn boostrap` and then `yarn build` as per [Building a Kibana distributable | Kibana Guide [master] | Elastic](https://www.elastic.co/guide/en/kibana/master/building-kibana.html) I'm getting this GPG-KEY mismatch error:

```auto
│ERROR failure 1 min 5 sec
    │ERROR Error: Failed to copy @kbn/fleet-plugin into the build: Error downloading Elastic GPG key from https://artifacts.elastic.co/GPG-KEY-elasticsearch to /home/breno-andrade/build/kibana/x-pack/plugins/fleet/target/keys/GPG-KEY-elasticsearch: Downloaded checksum 62a567354286deb02baf5fc6b82ddf6c7067898723463da9ae65b132b8c6d6f064b2874e390885682376228eed166c1c82fe7f11f6c9a69f0c157029c548fa3d does not match the expected sha512 checksum.
    │ at downloadElasticGpgKey (download_elastic_gpg_key.ts:36:11)
    │ at runMicrotasks (<anonymous>)
    │ at processTicksAndRejections (node:internal/process/task_queues:96:5)
    │ at async Promise.all (index 1)
    │ at fleetBuildTasks (index.ts:16:3)
    │ at build_packages_task.ts:303:13

```

Does anyone know how I could handle this approach to get my own Kibana 8.9.0 build?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [December 15, 2023, 8:30am UTC](https://discuss.elastic.co/t/kibana-security-cve-building-8-9-0-docker-distributable/349409/2 "2023-12-15T08:30:13Z")

</div>

I don't have the answer but why not upgrading the whole cluster to the most secured version 8.11?

It contains more security patches than this single one IIRC.

---

<div class="post-metadata">

### Author: ![breno.andrade](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@breno.andrade](https://discuss.elastic.co/u/breno.andrade)
#### Post date: [December 15, 2023, 10:57am UTC](https://discuss.elastic.co/t/kibana-security-cve-building-8-9-0-docker-distributable/349409/3 "2023-12-15T10:57:21Z")

</div>

Because there are other dependencies from our product we can't upgrade right away.

---

<div class="post-metadata">

### Author: ![breno.andrade](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@breno.andrade](https://discuss.elastic.co/u/breno.andrade)
#### Post date: [December 15, 2023, 6:17pm UTC](https://discuss.elastic.co/t/kibana-security-cve-building-8-9-0-docker-distributable/349409/4 "2023-12-15T18:17:39Z")

</div>

Well, anyway... I figured it out by myself. The issue is under

src/dev/build/tasks/fleet/download\_elastic\_gpg\_key.ts  
and  
src/dev/build/tasks/patch\_native\_modules\_task.ts

I had to manage this property:

```auto
skipChecksumCheck: true

```

under the `await downloadToDisk()` for both files.

---

<div class="post-metadata">

### Author: ![Dallas\_Toth](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dallas_toth/32/22630_2.png) [@Dallas\_Toth](https://discuss.elastic.co/u/Dallas_Toth)
#### Post date: [December 21, 2023, 9:09pm UTC](https://discuss.elastic.co/t/kibana-security-cve-building-8-9-0-docker-distributable/349409/5 "2023-12-21T21:09:39Z")

</div>

I hit this same issue. I am building a 8.8.0 version of Kibana using Gitlab CICD and had the same

```auto
debg [3/3] Attempting download of https://artifacts.elastic.co/GPG-KEY-elasticsearch sha512
   │ debg Downloaded 1794 bytes to /builds/koat/KOAT-Kibana/build/kibana/x-pack/plugins/fleet/target/keys/GPG-KEY-elasticsearch
   │ debg Download failed: Downloaded checksum 62a567354286deb02baf5fc6b82ddf6c7067898723463da9ae65b132b8c6d6f064b2874e390885682376228eed166c1c82fe7f11f6c9a69f0c157029c548fa3d does not match the expected sha512 checksum.
   │ debg Deleting downloaded data at /builds/koat/KOAT-Kibana/build/kibana/x-pack/plugins/fleet/target/keys/GPG-KEY-elasticsearch
   │ERROR failure 1 min 42 sec
   │ERROR Error: Failed to copy @kbn/fleet-plugin into the build: Error downloading Elastic GPG key from https://artifacts.elastic.co/GPG-KEY-elasticsearch to /builds/koat/KOAT-Kibana/build/kibana/x-pack/plugins/fleet/target/keys/GPG-KEY-elasticsearch: Downloaded checksum 62a567354286deb02baf5fc6b82ddf6c7067898723463da9ae65b132b8c6d6f064b2874e390885682376228eed166c1c82fe7f11f6c9a69f0c157029c548fa3d does not match the expected sha512 checksum.
   │ at downloadElasticGpgKey (download_elastic_gpg_key.ts:36:11)
   │ at processTicksAndRejections (node:internal/process/task_queues:96:5)
   │ at async Promise.all (index 1)
   │ at fleetBuildTasks (index.ts:16:3)
   │ at build_packages_task.ts:303:13

```

---

<div class="post-metadata">

### Author: ![breno.andrade](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@breno.andrade](https://discuss.elastic.co/u/breno.andrade)
#### Post date: [December 21, 2023, 9:33pm UTC](https://discuss.elastic.co/t/kibana-security-cve-building-8-9-0-docker-distributable/349409/6 "2023-12-21T21:33:24Z")

</div>

So you may modify/fill in the property `skipChecksumCheck: true` in the downloadToDisk() method I mentioned for both:

```auto
src/dev/build/tasks/fleet/download_elastic_gpg_key.ts
src/dev/build/tasks/patch_native_modules_task.ts

```

It should work out for your build pipeline.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 18, 2024, 9:33pm UTC](https://discuss.elastic.co/t/kibana-security-cve-building-8-9-0-docker-distributable/349409/7 "2024-01-18T21:33:40Z")

</div>

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