Skip to content

Commit 43f790e

Browse files
committed
Merge #454: chore: [#433] upgrade Prometheus to v3.11.2 and document CVE analysis
f8e9730 chore: [#433] align table columns in scans README (Jose Celano) 91fd28a fix: [#433] update v3.5.1 references to v3.11.2 in tests and docs (Jose Celano) 5a2b09a chore: [#433] upgrade Prometheus to v3.11.2 and document CVE analysis (Jose Celano) Pull request description: ## Summary Upgrades Prometheus from `v3.5.1` to `v3.11.2` (latest as of 2026-04-13), eliminating all CRITICAL CVEs. Closes #433 ## Changes - `src/domain/prometheus/config.rs`: bump `PROMETHEUS_DOCKER_IMAGE_TAG` from `v3.5.1` to `v3.11.2` - `docs/security/docker/scans/prometheus.md`: update current status table and add new scan history entry for 2026-04-14 - `docs/issues/433-prometheus-cves.md`: fill in Outcome section with scan results and checked-off steps - `.github/workflows/docker-security-scan.yml`: update example image tag in comment - `project-words.txt`: add `buger`, `cves`, `jsonparser` ## Scan Results ### Version Comparison | Version | HIGH | CRITICAL | | -------- | ---- | -------- | | v3.5.0 | 16 | 4 | | v3.5.1 | 6 | 2 | | v3.11.2 | 4 | **0** ✅ | ### Remaining CVEs in v3.11.2 (all HIGH, no remote attack path) | CVE | Library | Fix | Notes | | -------------- | ---------------- | ------- | -------------------------------- | | CVE-2026-32285 | buger/jsonparser | 1.1.2 | DoS via malformed JSON; internal | | CVE-2026-34040 | moby/docker | 29.3.1 | Auth bypass; Docker-client code | | CVE-2026-39883 | otel/sdk | 1.43.0 | Local PATH hijack; no remote | No OS layer — pure Go binaries, no Alpine/Debian base image. All remaining findings are in upstream Prometheus binary dependencies with no remote attack path. ACKs for top commit: josecelano: ACK f8e9730 Tree-SHA512: b9f69ba5451c7195c41cdadd8c5fa45ccdc28fabf1a81377635a9e62f60ee137b0ad483d895f2f5ca17579f7b8b0c37e25a1e9d35ea69f43edb977b19af3ee0f
2 parents 95a063f + f8e9730 commit 43f790e

9 files changed

Lines changed: 106 additions & 31 deletions

File tree

.github/workflows/docker-security-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
timeout-minutes: 10
102102
outputs:
103103
# JSON array of Docker image references for use in scan matrix
104-
# Example: ["torrust/tracker:develop","mysql:8.4","prom/prometheus:v3.5.1","grafana/grafana:13.0.0","caddy:2.10.2"]
104+
# Example: ["torrust/tracker:develop","mysql:8.4","prom/prometheus:v3.11.2","grafana/grafana:13.0.0","caddy:2.10.2"]
105105
images: ${{ steps.extract.outputs.images }}
106106

107107
steps:

docs/issues/433-prometheus-cves.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,51 @@ After PR #436 upgraded Prometheus from `v3.5.0` to `v3.5.1`:
2727

2828
## Steps
2929

30-
- [ ] Check the latest Prometheus release:
30+
- [x] Check the latest Prometheus release:
3131
<https://hub.docker.com/r/prom/prometheus/tags>
32-
- [ ] Run Trivy against candidate newer tags:
32+
- [x] Run Trivy against candidate newer tags:
3333
`trivy image --severity HIGH,CRITICAL prom/prometheus:LATEST_TAG`
34-
- [ ] Compare results against the v3.5.1 baseline in
34+
- [x] Compare results against the v3.5.1 baseline in
3535
`docs/security/docker/scans/prometheus.md`
36-
- [ ] **If CRITICALs are cleared**: update `src/domain/prometheus/config.rs` and
36+
- [x] **If CRITICALs are cleared**: update `src/domain/prometheus/config.rs` and
3737
the CI scan matrix; update the scan doc; post results comment; close #433
3838
- [ ] **If CRITICALs remain**: post comment documenting which CVEs remain and why
3939
they cannot be fixed (upstream binary); add revisit note to #433; leave open
4040

4141
## Outcome
4242

43-
<!-- Fill in after doing the work -->
43+
- Date: 2026-04-14
44+
- Latest Prometheus tag tested: `v3.11.2` (released 2026-04-13)
45+
- Decision: **upgrade to `prom/prometheus:v3.11.2`** — all CRITICALs eliminated
46+
- Action: updated `src/domain/prometheus/config.rs`; updated scan doc; updated CI matrix comment
47+
- PR: opened against `main` on branch `433-prometheus-cves`
4448

45-
- Date:
46-
- Latest Prometheus tag tested:
47-
- Findings (HIGH / CRITICAL):
48-
- Decision: upgrade / accept risk / leave open
49-
- Comment/PR:
49+
### Scan details — `prom/prometheus:v3.11.2` (Trivy, 2026-04-14)
50+
51+
**Version comparison:**
52+
53+
| Version | HIGH | CRITICAL |
54+
| --------- | ---- | -------- |
55+
| `v3.5.0` | 16 | 4 |
56+
| `v3.5.1` | 6 | 2 |
57+
| `v3.11.2` | 4 | 0 ✅ |
58+
59+
**Target breakdown (`v3.11.2`):**
60+
61+
| Target | HIGH | CRITICAL |
62+
| ---------------- | ---- | -------- |
63+
| `bin/prometheus` | 3 | 0 |
64+
| `bin/promtool` | 1 | 0 |
65+
66+
No OS layer — pure Go binaries, no Alpine/Debian base.
67+
68+
**Remaining CVEs (all HIGH, no remote attack path):**
69+
70+
| CVE | Library | Installed | Fixed In | Notes |
71+
| -------------- | ---------------- | --------- | -------- | ----------------------------------------- |
72+
| CVE-2026-32285 | buger/jsonparser | v1.1.1 | 1.1.2 | DoS via malformed JSON; internal use only |
73+
| CVE-2026-34040 | moby/docker | v28.5.2 | 29.3.1 | Auth bypass; Docker-client code path |
74+
| CVE-2026-39883 | otel/sdk | v1.42.0 | 1.43.0 | Local PATH hijack; no remote path |
75+
76+
**Overall risk**: All 4 remaining findings are local-only. No remote attack path.
77+
Upgrade to v3.11.2 is the recommended action and was applied.

docs/security/docker/scans/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ This directory contains historical security scan results for Docker images used
44

55
## Current Status Summary
66

7-
| Image | Version | HIGH | CRITICAL | Status | Last Scan | Details |
8-
| -------------------------------------- | ------- | ---- | -------- | ------------------------- | ----------- | ----------------------------------------------- |
9-
| `torrust/tracker-deployer` | trixie | 44 | 1 | ⚠️ Partial remediation | Apr 8, 2026 | [View](torrust-tracker-deployer.md) |
10-
| `torrust/tracker-backup` | trixie | 6 | 0 | ℹ️ Remediation no change | Apr 8, 2026 | [View](torrust-tracker-backup.md) |
11-
| `torrust/tracker-ssh-server` | 3.23.3 | 0 | 0 | ✅ Remediated (vuln scan) | Apr 8, 2026 | [View](torrust-ssh-server.md) |
12-
| `torrust/tracker-provisioned-instance` | 24.04 | 0 | 0 | ✅ Remediated (vuln scan) | Apr 8, 2026 | [View](torrust-tracker-provisioned-instance.md) |
13-
| `caddy` | 2.10.2 | 14 | 4 | ⚠️ Partial remediation | Apr 8, 2026 | [View](caddy.md) |
14-
| `prom/prometheus` | v3.5.1 | 6 | 4 | ⚠️ Partial remediation | Apr 8, 2026 | [View](prometheus.md) |
15-
| `grafana/grafana` | 12.4.2 | 4 | 0 | ⚠️ Partial remediation | Apr 8, 2026 | [View](grafana.md) |
16-
| `mysql` | 8.4 | 7 | 1 | ⚠️ Monitored | Apr 8, 2026 | [View](mysql.md) |
7+
| Image | Version | HIGH | CRITICAL | Status | Last Scan | Details |
8+
| -------------------------------------- | ------- | ---- | -------- | ------------------------- | ------------ | ----------------------------------------------- |
9+
| `torrust/tracker-deployer` | trixie | 44 | 1 | ⚠️ Partial remediation | Apr 8, 2026 | [View](torrust-tracker-deployer.md) |
10+
| `torrust/tracker-backup` | trixie | 6 | 0 | ℹ️ Remediation no change | Apr 8, 2026 | [View](torrust-tracker-backup.md) |
11+
| `torrust/tracker-ssh-server` | 3.23.3 | 0 | 0 | ✅ Remediated (vuln scan) | Apr 8, 2026 | [View](torrust-ssh-server.md) |
12+
| `torrust/tracker-provisioned-instance` | 24.04 | 0 | 0 | ✅ Remediated (vuln scan) | Apr 8, 2026 | [View](torrust-tracker-provisioned-instance.md) |
13+
| `caddy` | 2.10.2 | 14 | 4 | ⚠️ Partial remediation | Apr 8, 2026 | [View](caddy.md) |
14+
| `prom/prometheus` | v3.11.2 | 4 | 0 | ✅ Remediated | Apr 14, 2026 | [View](prometheus.md) |
15+
| `grafana/grafana` | 12.4.2 | 4 | 0 | ⚠️ Partial remediation | Apr 8, 2026 | [View](grafana.md) |
16+
| `mysql` | 8.4 | 7 | 1 | ⚠️ Monitored | Apr 8, 2026 | [View](mysql.md) |
1717

1818
**Overall Status**: ⚠️ **CVE database update detected** - Most images still show increased vulnerability counts from previous scans (Feb-Dec 2025). Deployer has a first remediation pass applied (49 HIGH -> 44 HIGH, with 1 CRITICAL still open).
1919

docs/security/docker/scans/prometheus.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,56 @@ Security scan history for the `prom/prometheus` Docker image.
44

55
## Current Status
66

7-
| Version | HIGH | CRITICAL | Status | Last Scan | Support EOL |
8-
| ------- | ---- | -------- | ------------------------------------ | ----------- | ------------ |
9-
| v3.5.1 | 6 | 4 | ⚠️ Partial improvement after upgrade | Apr 8, 2026 | Jul 31, 2026 |
7+
| Version | HIGH | CRITICAL | Status | Last Scan | Support EOL |
8+
| ------- | ---- | -------- | ----------------------------- | ------------ | ----------- |
9+
| v3.11.2 | 4 | 0 | ✅ No CRITICALs after upgrade | Apr 14, 2026 | TBD |
1010

1111
## Scan History
1212

13+
### April 14, 2026 - Remediation Pass 2 (Issue #433)
14+
15+
**Image**: `prom/prometheus:v3.11.2`
16+
**Trivy Version**: 0.68.2
17+
**Scan Mode**: `--scanners vuln --severity HIGH,CRITICAL`
18+
**Status**: ✅ **4 vulnerabilities** (4 HIGH, 0 CRITICAL)
19+
20+
#### Summary
21+
22+
Upgraded Prometheus from `v3.5.1` to `v3.11.2` (latest as of 2026-04-13). All
23+
CRITICAL vulnerabilities eliminated. Four HIGH findings remain in upstream
24+
binary dependencies; all are local-only (no remote attack path).
25+
26+
Vulnerability comparison:
27+
28+
| Version | HIGH | CRITICAL |
29+
| ------- | ---- | -------- |
30+
| v3.5.0 | 16 | 4 |
31+
| v3.5.1 | 6 | 2 |
32+
| v3.11.2 | 4 | 0 |
33+
34+
#### Target Breakdown (`v3.11.2`)
35+
36+
| Target | HIGH | CRITICAL |
37+
| ---------------- | ---- | -------- |
38+
| `bin/prometheus` | 3 | 0 |
39+
| `bin/promtool` | 1 | 0 |
40+
41+
No OS layer — pure Go binaries, no Alpine/Debian base image.
42+
43+
#### Remaining CVEs
44+
45+
| CVE | Library | Installed | Fixed In | Severity | Notes |
46+
| -------------- | ---------------- | --------- | -------- | -------- | ----------------------------------------- |
47+
| CVE-2026-32285 | buger/jsonparser | v1.1.1 | 1.1.2 | HIGH | DoS via malformed JSON; internal use only |
48+
| CVE-2026-34040 | moby/docker | v28.5.2 | 29.3.1 | HIGH | Auth bypass; Docker-client code path |
49+
| CVE-2026-39883 | otel/sdk | v1.42.0 | 1.43.0 | HIGH | Local PATH hijack; no remote path |
50+
51+
All remaining findings are in upstream Prometheus binary dependencies. No
52+
remote attack path exists for any of the three CVE types, and fixes are
53+
pending upstream Prometheus releases.
54+
55+
---
56+
1357
### April 8, 2026 - Remediation Pass 1 (Issue #428)
1458

1559
**Image**: `prom/prometheus:v3.5.1`

project-words.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ bootcmd
164164
browsable
165165
btih
166166
btrfs
167+
buger
167168
buildx
168169
cdmon
169170
celano
@@ -199,6 +200,7 @@ crontabs
199200
cursorignore
200201
custompass
201202
customuser
203+
cves
202204
cyberneering
203205
dcron
204206
dearmor
@@ -280,6 +282,7 @@ josecelano
280282
journalctl
281283
jsonlint
282284
jsonls
285+
jsonparser
283286
keepalive
284287
keygen
285288
keypair

src/application/command_handlers/show/info/docker_images.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub struct DockerImagesInfo {
1212
/// `MySQL` Docker image reference (e.g. `mysql:8.4`), present when `MySQL` is configured
1313
pub mysql: Option<String>,
1414

15-
/// Prometheus Docker image reference (e.g. `prom/prometheus:v3.5.1`), present when configured
15+
/// Prometheus Docker image reference (e.g. `prom/prometheus:v3.11.2`), present when configured
1616
pub prometheus: Option<String>,
1717

1818
/// Grafana Docker image reference (e.g. `grafana/grafana:12.4.2`), present when configured

src/domain/prometheus/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const DEFAULT_SCRAPE_INTERVAL_SECS: u32 = 15;
2121
pub const PROMETHEUS_DOCKER_IMAGE_REPOSITORY: &str = "prom/prometheus";
2222

2323
/// Docker image tag for the Prometheus container
24-
pub const PROMETHEUS_DOCKER_IMAGE_TAG: &str = "v3.5.1";
24+
pub const PROMETHEUS_DOCKER_IMAGE_TAG: &str = "v3.11.2";
2525

2626
/// Prometheus metrics collection configuration
2727
///
@@ -95,7 +95,7 @@ impl PrometheusConfig {
9595
/// use torrust_tracker_deployer_lib::domain::prometheus::PrometheusConfig;
9696
///
9797
/// let image = PrometheusConfig::docker_image();
98-
/// assert_eq!(image.full_reference(), "prom/prometheus:v3.5.1");
98+
/// assert_eq!(image.full_reference(), "prom/prometheus:v3.11.2");
9999
/// ```
100100
#[must_use]
101101
pub fn docker_image() -> DockerImage {

src/infrastructure/templating/docker_compose/template/renderer/docker_compose.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ mod tests {
407407
"Rendered output should contain prometheus service"
408408
);
409409
assert!(
410-
rendered_content.contains("image: prom/prometheus:v3.5.1"),
411-
"Should use Prometheus v3.5.0 image"
410+
rendered_content.contains("image: prom/prometheus:v3.11.2"),
411+
"Should use Prometheus v3.11.2 image"
412412
);
413413
assert!(
414414
rendered_content.contains("container_name: prometheus"),
@@ -466,7 +466,7 @@ mod tests {
466466

467467
// Verify Prometheus service is NOT present
468468
assert!(
469-
!rendered_content.contains("image: prom/prometheus:v3.5.1"),
469+
!rendered_content.contains("image: prom/prometheus:v3.11.2"),
470470
"Should not contain Prometheus service when config absent"
471471
);
472472
assert!(

src/infrastructure/templating/docker_compose/template/wrappers/docker_compose/context/prometheus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use super::service_topology::ServiceTopology;
1818
/// Uses `ServiceTopology` to share the common topology structure with other services.
1919
#[derive(Serialize, Debug, Clone)]
2020
pub struct PrometheusServiceContext {
21-
/// Docker image reference (e.g. `prom/prometheus:v3.5.1`)
21+
/// Docker image reference (e.g. `prom/prometheus:v3.11.2`)
2222
pub image: String,
2323

2424
/// Service topology (ports and networks)

0 commit comments

Comments
 (0)