CVE-2026-103025 — bep imagemeta
Research article
bep/imagemeta Go library: crafted PNG zTXt IPTC metadata can exhaust memory during Decode (CVE-2026-103025)
| CVE | CVE-2026-103025 |
|---|---|
| Vendor and product | bep imagemeta |
| Published | November 21, 2026 02:15 UTC |
| Research cut-off | November 21, 2026 02:10 UTC |
| Sources reviewed | 4: NVD record (last modified 2026-11-19); CISA KEV catalog; GitHub advisory (2026-11-20); FIRST EPSS (2026-11-20) |
Executive summary
CVE-2026-103025 is a memory-exhaustion flaw in the bep/imagemeta Go library, where imagemeta.Decode mishandles PNG zTXt chunks carrying raw IPTC profiles [1]. NVD lists a CVSS 4.0 base score of 8.7 (HIGH) with vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N, scored by GitHub as a secondary scorer; the GitHub advisory matches this score and base vector [1, 3]. The record and the GitHub advisory both place the affected range below 0.17.3, with 0.17.3 as the fixed release [1, 3]. Exploitation needs an application that decodes untrusted PNG files and processes IPTC metadata, and the stated consequence is denial of service through memory exhaustion [1]. The vector reports no confidentiality, integrity or downstream impact [1, 3]. CISA's Known Exploited Vulnerabilities catalog did not list the CVE as of 2026-11-21, which does not prove it has not been exploited [2]. The FIRST EPSS estimate is 0.47% for the next 30 days, which is a statistical estimate and not evidence of exploitation [4]. The most important immediate action is to inventory Go modules for github.com/bep/imagemeta below v0.17.3 and upgrade them to v0.17.3 [1, 3].
Key points
- CVE-2026-103025 is a memory-exhaustion flaw in bep/imagemeta's imagemeta.Decode when processing PNG zTXt chunks with raw IPTC profiles [1].
- NVD and GitHub both score it CVSS 4.0 8.7 HIGH with vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N; the impact is availability only [1, 3].
- Versions below 0.17.3 are affected; 0.17.3 is the vendor-published fix [1, 3].
- Exploitation requires an application that decodes untrusted PNG files with IPTC processing enabled [1].
- CISA KEV did not list the CVE as of 2026-11-21, which does not show absence of exploitation; EPSS is 0.47% [2, 4].
Vulnerability identification
| Item | Detail | Source |
|---|---|---|
| CVE ID | CVE-2026-103025 | S1 |
| Vendor / project | bep (imagemeta) | S1 |
| Product and package | imagemeta Go library, module github.com/bep/imagemeta | S1, S3 |
| Affected component | imagemeta.Decode, handling of PNG zTXt metadata chunks used for IPTC data | S1 |
| Platform | Go library for reading EXIF, IPTC and XMP metadata from JPEG, TIFF, PNG and WebP files | S1 |
| Published / last modified | 2026-11-19T20:17:12 / 2026-11-19T21:17:40 | S1 |
| Record status | Received; the only CVSS score listed is the secondary one, scored by GitHub | S1 |
| CWE | CWE-409 (improper handling of highly compressed data, data amplification); CWE-789 (memory allocation with excessive size value) | S1, S3 |
| CVSS 4.0 | 8.7 HIGH; vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N | S1, S3 |
| CVSS scorer | GitHub, recorded as Secondary in NVD; the GitHub advisory record gives the same score | S1, S3 |
| Related identifiers | GHSA-7hvw-3c2q-45qg; commit 2289fdf83fcd238d86f72e65c588da687c998437; pull request 69; release tag v0.17.3 | S1, S3 |
The two CVSS strings differ in form. The NVD string also lists the threat and environmental metrics, all set to X (not defined), while the GitHub string stops at the base metrics. Both carry the same base metrics and score [1, 3]. CWE-409 concerns processing compressed input whose expanded size is not bounded. CWE-789 concerns allocating memory with a size that is not limited to a safe value. These are explanations of the CWE names, not statements from the sources.
Vulnerability description
The record describes a resource-exhaustion defect in the library's metadata decoder. When a PNG contains a zTXt chunk (a compressed text chunk) whose keyword marks a raw IPTC profile, imagemeta.Decode uses the chunk's declared length to size a memory allocation and inflates the embedded zlib stream without any limit on the output [1]. The security property affected is availability: the process decoding the file can run out of memory [1, 3].
Two figures appear in the record. A 42-byte input led to an allocation of about 256 MB, and roughly 127 KB of compressed input expanded to around 460 MB [1]. Whether the large allocation becomes real memory use depends on the host's memory overcommit policy and on any configured Go memory limit or container cgroup limit. The decompression path reliably consumes resident memory [1].
The flaw matters when an application decodes untrusted PNG files and processes IPTC metadata, and it affects versions below 0.17.3 [1, 3]. The pack does not establish code execution, data disclosure or integrity loss. The vector sets confidentiality, integrity and downstream impacts to none [1, 3].
Root cause analysis
Confirmed: the decoder trusts the declared chunk length when sizing an allocation and inflates the zlib stream without an output limit [1]. Confirmed: NVD and GitHub map the flaw to CWE-409 and CWE-789 [1, 3].
Analyst assessment: the underlying error is the absence of size checks at two points. The declared length is not checked against the data actually present in the file, and the decompressed size is not capped. These checks are the usual defence against decompression amplification and oversized allocation, and their absence explains how a small file can cause a large memory effect.
Not established: the 0.17.3 code change. The commit and pull request are referenced in the record [1], but their contents are not in the pack, so the exact fix cannot be confirmed.
Technical mechanics
The following flow is derived from the record's description [1]. The ordering is an analyst reading.
- The application passes an untrusted PNG file to imagemeta.Decode.
- The parser reaches a zTXt chunk whose keyword marks a raw IPTC profile.
- The chunk's declared length sets the size of a memory allocation.
- The allocation is not validated against the real size of the file, so it can be far larger than the input.
- The compressed content is inflated with no output cap, so resident memory grows with the decompressed size.
- Memory use keeps growing until the process is killed, the host reclaims memory, or a configured limit is reached. Step 4 becomes real memory use only depending on overcommit and limits [1].
The controls that should have prevented this are bounds on the declared length and on the inflated output size [S1, analyst assessment].
Attack surface and exploitation prerequisites
| Factor | Evidence | Source |
|---|---|---|
| Access path | Network attack vector (AV:N) | S1, S3 |
| Privileges | None required (PR:N) | S1, S3 |
| User interaction | None required by the vector (UI:N); whether a real application needs a user action to submit a file is not established | S1, S3 |
| Complexity | Low attack complexity (AC:L); no attack requirements (AT:N) | S1, S3 |
| Required feature | Application decodes untrusted PNG files and processes IPTC metadata | S1 |
| Environment | Host overcommit policy and Go memory or container cgroup limits change the allocation effect | S1 |
| Version | imagemeta versions below 0.17.3 | S1, S3 |
| Interfaces | Not identified in the pack: which software exposes upload endpoints or batch image processing | Not established |
These prerequisites come from the vector and the record's description. No source documents a real deployment, so exposure in any given product is not established.
Impact analysis
| Area | Assessment | Basis |
|---|---|---|
| Availability | High (VA:H): memory exhaustion of the decoding process | S1, S3 |
| Confidentiality | None (VC:N) | S1, S3 |
| Integrity | None (VI:N) | S1, S3 |
| Downstream systems | None (SC:N, SI:N, SA:N) | S1, S3 |
| Authentication and authorization | No privilege boundary is described in the record | S1 |
| Business operations | Analyst assessment: outage or restart of an image-processing service that decodes untrusted PNG files; the size of the effect depends on deployment | S1 |
| Regulatory or contractual | Not established by the pack | Not established |
Affected products and versions
| Vendor | Product / component | Affected versions | Fixed version | Platform | Source and qualification |
|---|---|---|---|---|---|
| bep | imagemeta, module github.com/bep/imagemeta | Below 0.17.3 | 0.17.3 | Go library | Record and GitHub advisory agree [1, 3]; the lower bound of the range is not published |
The pack contains no later release, backport to another release line, or configuration-specific exclusion. No known exclusions are reported [1, 3].
Exploitation and threat intelligence status
- Confirmed exploitation in the wild: not established. The pack contains no exploitation reports.
- CISA KEV: not listed as of 2026-11-21 [2]. The source states this is not evidence that the CVE was never exploited.
- EPSS: 0.0047 (0.47%), percentile 0.4145, dated 2026-11-20 [4]. The source describes it as a statistical estimate, not evidence of exploitation.
- Public proof of concept: none appears in the pack. The record lists a commit, a pull request, a release tag and an advisory [1]; these are fix and advisory references, and the pack does not describe any exploit code.
- Threat actors, campaigns and targeted sectors: none attributed in the pack.
The absence of public evidence does not show that exploitation has not occurred.
Detection and exposure assessment
Run these read-only checks in each Go module root and in any deployed build environment:
- go list -m github.com/bep/imagemeta. Prerequisites: Go toolchain and a go.mod file. Expected output: the module path followed by a version. Any version below v0.17.3 is affected [1, 3].
- go list -m all, then filter for github.com/bep/imagemeta. This finds the module as a transitive dependency.
- go version -m on a compiled binary. This lists the module versions embedded at build time, if the binary was built with module information.
- Read go.sum for github.com/bep/imagemeta and confirm the locked version is 0.17.3 or later.
Limitations: a version match is not proof of exploitability, since it does not show whether untrusted PNGs reach the IPTC path [1]. The pack gives no vendor detection guidance, no indicators of compromise and no log fields. Reviewing upload logs for PNG submissions to services that decode images is a reasonable step, but the pack does not define specific events or fields for this CVE.
Remediation
Immediate mitigation (analyst assessment unless stated):
- Disable IPTC processing for untrusted PNG files in every application that does not need it. This follows from the stated preconditions [1]. Verify in staging by submitting a benign PNG without IPTC data and confirming normal processing.
- Run PNG decoding in a separate process or container with a memory limit below the host's capacity. The record states that the effect depends on cgroup and Go memory limits [1]. Verify the limit with the container runtime's own inspection command. Expect the worker to restart when the limit is reached.
- Cap the accepted upload size. This bounds the compressed input, but the record's 127 KB example shows that a size cap alone gives limited protection [1]. Choose the cap by testing decode memory in staging.
Permanent fix (vendor-confirmed):
- Upgrade to github.com/bep/imagemeta v0.17.3 using go get github.com/bep/imagemeta@v0.17.3, then go mod tidy [1, 3]. Prerequisites: Go toolchain and a test suite for the application.
- Review the v0.17.3 release notes and the referenced pull request before deploying, because their contents are not in the pack [1].
- Rebuild and redeploy. The pack does not state whether a running service must restart or can reload. Restart the service with the new binary.
- Verify with go list -m github.com/bep/imagemeta, which should show v0.17.3, and with go version -m on the deployed binary.
- Keep the previous go.mod and go.sum under version control to allow rollback.
Post-update validation: in staging, decode a benign PNG containing IPTC metadata of known size and confirm that the metadata is parsed as expected and memory use stays stable. Then confirm that no version below v0.17.3 remains in go list -m all output.
Workarounds and compensating controls
The measures above reduce exposure but are not equivalent to the fix. The vulnerable decoding code remains in place until v0.17.3 is deployed [1, 3]. Disabling IPTC processing removes only one path, and a memory limit contains the effect of the flaw without preventing the allocation. Residual risk remains for any remaining untrusted PNG decoding.
Remediation checklist
- Inventory: run go list -m github.com/bep/imagemeta in each Go module root and go list -m all to find transitive use; flag any version below v0.17.3 [1, 3].
- Identify call paths: find code that calls imagemeta.Decode on untrusted PNG files with IPTC processing, and record the owning service [1].
- Interim control: disable IPTC processing for untrusted PNG input where it is not required; verify in staging with a benign PNG without IPTC data [S1, analyst assessment].
- Interim control: move PNG decoding into a process or container with a memory limit below host capacity; verify the limit with the runtime's inspection command and expect restarts on breach [1].
- Upgrade: run go get github.com/bep/imagemeta@v0.17.3 and go mod tidy, then rebuild and run the test suite [1, 3].
- Review the v0.17.3 release notes and the referenced pull request before deployment, since their contents are not in the pack [1].
- Redeploy the service with the rebuilt binary and restart it; confirm the deployed build reports v0.17.3 with go version -m [1, 3].
- Regression test: decode a benign PNG with known IPTC metadata in staging and confirm the parsed fields and memory use are as expected [analyst assessment].
- Monitor the decoding services for out-of-memory events after rollout, comparing against a baseline captured before the change; the pack defines no specific log fields [1].
- Keep the previous go.mod and go.sum in version control so the change can be rolled back [analyst assessment].
- Recheck CISA KEV and EPSS status and the NVD record periodically, since the NVD analysis was not complete at the cut-off [1, 2, 4].
Evidence gaps
- Not established by the reviewed sources: the lower bound of the affected version range; the record gives only versions below 0.17.3. Check the module's tagged release history.
- Not established by the reviewed sources: the code change in 0.17.3. The commit and pull request are referenced, but their contents are not in the pack; review them directly.
- Not established by the reviewed sources: NVD's own completed analysis; the record status is Received, and only a GitHub-scored CVSS entry appears. Recheck the NVD record for analysis updates.
- Not established by the reviewed sources: confirmed exploitation in the wild; the pack has no exploitation reports. Check CISA KEV and threat reporting after the cut-off.
- Not established by the reviewed sources: public proof-of-concept code; none is referenced in the pack beyond fix and advisory references.
- Not established by the reviewed sources: indicators of compromise, log events or vendor detection guidance; obtain them from the vendor advisory or upload-service logs.
- Not established by the reviewed sources: which software and services in the deployment use the library, and whether they process untrusted PNG files with IPTC data; this requires an internal inventory.
- Not established by the reviewed sources: the real memory effect on specific platforms; it depends on overcommit and limits and requires testing in the target environment.
- Not established by the reviewed sources: regulatory or contractual consequences of a service outage for any specific organization.
References
- CVE-2026-103025 record. NIST National Vulnerability Database (NVD), 2026-11-19. https://nvd.nist.gov/vuln/detail/CVE-2026-103025. Accessed 2026-11-21.
- Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-11-21. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-21.
- GHSA-7hvw-3c2q-45qg. GitHub Security Advisory Database, 2026-11-20. https://github.com/advisories/GHSA-7hvw-3c2q-45qg. Accessed 2026-11-21.
- EPSS score for CVE-2026-103025. FIRST, 2026-11-20. https://api.first.org/data/v1/epss?cve=CVE-2026-103025. Accessed 2026-11-21.
Summary
bep/imagemeta is a Go library for reading EXIF, IPTC and XMP image meta data from JPEG, TIFF, PNG, and WebP files. Prior to 0.17.3, imagemeta.Decode could exhaust memory when parsing PNG zTXt chunks whose keyword is "Raw profile type iptc": the declared chunk length can drive an allocation far larger than the input file, and the embedded zlib stream is decompressed without an output limit. The advisory reports a 42-byte input causing a 256 MB allocation and a 127 KB input inflating to 460 MB. The oversized-allocation path's memory effect depends on platform overcommit and configured GOMEMLIMIT or cgroup limits, while the decompression path reliably creates resident memory. Applications that decode untrusted PNGs with IPTC metadata processing can therefore suffer denial of service through memory exhaustion. This issue is fixed in 0.17.3.
Severity breakdown
High · 8.7
An attacker without an account can exploit this over the network, without any user action.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Special conditions
- none
- Login needed
- no
- User action needed
- no
- Impact
- high on availability, none on confidentiality and integrity
- Impact on other systems
- none
Weakness
- CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)
- CWE-789: Memory Allocation with Excessive Size Value
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| github.com/bep/imagemeta (Go) | < 0.17.3 | 0.17.3 |
| bep imagemeta | < 0.17.3 | — |
References by type
Vendor advisories
Patches and fixed releases
- github.com/bep/imagemeta/commit/2289fdf83fcd238d86f72e65c588da687c998437
- github.com/bep/imagemeta/pull/69
- github.com/bep/imagemeta/releases/tag/v0.17.3
Other references
Affected
- bep imagemeta
Frequently asked questions
What is CVE-2026-103025?
CVE-2026-103025 is a memory-exhaustion flaw in the bep/imagemeta Go library, where imagemeta.Decode mishandles PNG zTXt chunks carrying raw IPTC profiles. NVD lists a CVSS 4.0 base score of 8.7 (HIGH) with vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N, scored by GitHub as a secondary scorer; the GitHub advisory matches this score and base vector. Weakness type: Improper Handling of Highly Compressed Data (Data Amplification) (CWE-409).
How severe is CVE-2026-103025?
CVE-2026-103025 has a CVSS 4.0 base score of 8.7 (high), from the CNA (github.com). An attacker without an account can exploit this over the network, without any user action.
Is CVE-2026-103025 being exploited?
Not as far as is known: CVE-2026-103025 is not in CISA's Known Exploited Vulnerabilities catalog as of December 4, 2026. EPSS estimates a 0.6% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-103025?
github.com/bep/imagemeta (Go) < 0.17.3 (fixed in 0.17.3); bep imagemeta < 0.17.3.
How do I fix CVE-2026-103025?
Inventory: run go list -m github.com/bep/imagemeta in each Go module root and go list -m all to find transitive use; flag any version below v0.17.3. Identify call paths: find code that calls imagemeta.Decode on untrusted PNG files with IPTC processing, and record the owning service. Interim control: disable IPTC processing for untrusted PNG input where it is not required; verify in staging with a benign PNG without IPTC data [S1, analyst assessment].
Timeline & sources
References
Related vulnerabilities & news
- Go Security Update Addresses Multiple Vulnerabilities
- NATS Server CVE-2026-58250: unauthenticated leafnode handshake crash via repeated INFO messages with compression enabled
- GHSA-vx8c-f5hh-c8pf / CVE-2026-137182 — Tinyauth: Nginx authentication bypass via spoofed X-Original-URL header
- GHSA-f9h7-4mmq-vgcq / CVE-2026-58262 — Klever Go counts bitmap padding bits toward BLS quorum, allowing blocks with insufficient signatures
- NATS Server MQTT CONNECT Parsing Flaw Enables Unauthenticated Memory Exhaustion (CVE-2026-58210)