Fedora Review Service got hacked
TL;DR: Everything is fine, no user data was compromised, no action is required.
The Fedora Review Service listens for updates on package review tickets, automatically builds the proposed packages in Copr, and runs the fedora-review tool on them. This provides rudimentary CI over our archaic Package Review Process. The service got hacked a couple of days ago, and I wanted to give you a post-mortem on the situation.
Who
Fortunately, this was an ethical hack done by Özgün Kültekin from Wakefield.co. As there is no reward money involved, the only thing I can do here is to give him (and by extension the company he is a part of) the credit. I’d also like to give him my biggest thanks for disclosing the vulnerability responsibly and collaborating with me on the fix.
When
- The vulnerability was introduced on 2023-02-04 by e280ee9
- The vulnerability was disclosed on Saturday 2026-11-28
- The vulnerability was fixed on Monday 2026-11-30 by 42c7097
- The fix was deployed to production the very same day
- All compromised credentials were rotated the very same day
How
The Fedora Review Service treats all user input as potentially dangerous because anyone on the internet can easily trigger it for their package. By design, all unsafe operations (such as building the package and running the fedora-review tool are done on Copr builder VMs). Well, clearly not all of them. I didn’t fully realize how unsafe specfile parsing is, and tried to parse some values directly in the container running the service. This seemingly harmless operation opens a path to arbitrary code execution.
Consider the following code:
from specfile import Specfile
spec = Specfile("hello.spec")
print(spec.url)
With the standard hello.spec, it prints just:
https://www.gnu.org/software/hello/
But with a specially crafted hello.spec by an attacker:
--- a/hello.spec
+++ b/hello.spec
@@ -1,3 +1,6 @@
+%global pwn %(echo pwn)
+%{echo:%{pwn}}
+
Name: hello
Version: 2.12.3
Release: %autorelease
It suddenly outputs:
pwn
pwn
pwn
https://www.gnu.org/software/hello/
The $(...) is arbirtrary shell execution, so the evil-doing potential is only
limited by your imagination.
I chose python3-specfile in the example because that’s what the Fedora Review Service code used. However, this is not a bug in this library but rather a fundamental RPM problem. When using the standard RPM library:
import rpm
spec = rpm.spec("hello.spec")
print(spec.sourceHeader[rpm.RPMTAG_URL])
The same problem occurs:
pwn
https://www.gnu.org/software/hello/
The only solution is to use a tool like norpm which explicitly disables Turing-Complete side effects when parsing the specfiles. Pavel Raiskup explained this problem in depth in his 2025 Flock talk and is advocating for Fedora to address this problem ever since.
Fix
I patched the Fedora Review Service vulnerability by switching from python3-specfile to python3-norpm. The change was done in 42c7097, which was reviewed and approved by Özgün. All compromised credentials were rotated.
Please do a mental inventory of the tools and services you are maintaining and make sure you don’t expose yourself to this kind of vulnerability.