Bug 2587557 - CVE-2026-140039 libproxy: libproxy: Denial of service via blocking PAC download and execution under lock [fedora-all]
Summary: CVE-2026-140039 libproxy: libproxy: Denial of service via blocking PAC downlo...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: libproxy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: David King
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: {"flaws": ["ad2febef-41c2-4aec-88d3-1...
Depends On:
Blocks: CVE-2026-140039
TreeView+ depends on / blocked
 
Reported: 2026-11-30 19:19 UTC by Marco Benatto
Modified: 2026-11-30 19:19 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Marco Benatto 2026-11-30 19:19:36 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

AI_ONLY_REPORT
package: libproxy-0.5.5-4.el10
------
Summary: Application-wide DoS via blocking PAC download and execution under  
global mutex: concurrent proxy lookups that share one `PxManager` can be  
stalled when PAC/WPAD resolution performs a slow PAC download or executes a  
malicious PAC script while the manager mutex is held.
Requirements to exploit: The affected build must include PAC support, the  
deployment must use PAC or WPAD for proxy discovery, and the attacker must  
be able to influence the PAC response used by the target process or  
otherwise cause the process to use a slow or malicious PAC source. The  
observable denial of service is established for callers that share one  
`PxManager` or a copied `pxProxyFactory` within the same process.
Component affected: `libproxy-0.5.5-4.el10`, primarily  
`src/backend/px-manager.c` in `px_manager_get_proxies_sync()` and  
`px_manager_pac_download()`, with PAC execution through  
`src/backend/plugins/pacrunner-duktape/pacrunner-duktape.c` when that  
runner is built and used.
Version affected: `libproxy-0.5.5-4.el10` when built with PAC support and  
used with PAC or WPAD resolution
Patch available: no released package fix established; proposed patch  
included below
Version fixed: unknown
Upstream coordination: Not notified.
CVSS: CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - 5.7 (MEDIUM)
AV:A - Exploitation depends on attacker influence over a PAC or WPAD  
path used by the victim environment, which is better described as adjacent  
rather than fully network-wide.
AC:L - Once the vulnerable configuration is in use, a slow PAC response  
or a PAC script with an infinite loop is straightforward to use.
PR:N - No privileges on the target host are required.
UI:R - The victim environment must use PAC or WPAD and trigger proxy  
resolution through the affected code path.
S:U - The impact remains within the affected application process and its  
shared manager instance.
C:N - No confidentiality impact was established.
I:N - No integrity impact was established.
A:H - Proxy resolution through the shared manager can be blocked for an  
extended period or indefinitely.
Impact: Moderate. Red Hat classifies remote denial of service issues as  
Important when they can easily affect availability, but the evidence here  
supports a narrower, configuration-dependent condition: PAC or WPAD must be  
enabled, PAC support must be present in the build, attacker influence over  
PAC delivery or PAC content is required, and the demonstrated impact is  
limited to callers sharing one manager instance in one process rather than  
a broader system compromise. That makes the availability impact real, but  
more conditional and less broadly exploitable than a typical  
Important-rated network service DoS.
Embargo: no
Reason: The demonstrated issue is a configuration-dependent denial of  
service with limited scope and straightforward operational mitigations, so  
immediate public handling is more appropriate than embargo.
Acknowledgement: Aisle Research
Vulnerability Details: `px_manager_get_proxies_sync()` holds `self->mutex`  
while it follows the PAC/WPAD code path. In that same locked region, the  
code may download PAC content synchronously and then evaluate or execute  
PAC JavaScript. This makes the duration of the critical section dependent  
on external network behavior and untrusted PAC logic.
```c
g_mutex_lock (&self->mutex);
/* ... */
if (px_manager_expand_wpad (self, conf_url) || px_manager_expand_pac (self,  
conf_url)) {
for (list = self->pacrunner_plugins; list && list->data; list =  
list->next) {
PxPacRunner *pacrunner = PX_PAC_RUNNER (list->data);
px_manager_run_pac (pacrunner, self->pac_data, uri, builder);
}
}
/* ... */
g_mutex_unlock (&self->mutex);
```
PAC download is synchronous:
```c
res = curl_easy_perform (self->curl);
```
PAC JavaScript evaluation and execution in the duktape runner is also shown  
without an execution deadline in the available code path excerpt:
```c
if (duk_peval_noresult (self->ctx)) { return FALSE; }
result = duk_pcall (self->ctx, 2);
```
On the available evidence, a malicious PAC script such as an infinite loop,  
or a PAC server that responds extremely slowly or never completes, can keep  
the mutex occupied long enough to block other concurrent proxy lookups that  
share the same manager. The evidence supports a denial-of-service condition  
for the affected process scope. It does not establish system-wide impact  
across unrelated processes.
Steps to reproduce:
1. Build and deploy the package with PAC support enabled.
2. Configure the affected process or user environment to use PAC or WPAD,  
for example by pointing proxy resolution to a PAC URL.
3. Serve a PAC file containing an infinite loop:
```javascript
function FindProxyForURL(url, host) { while (true) {} }
```
4. In one process, create one `pxProxyFactory` and trigger  
`px_proxy_factory_get_proxies()` from one thread.
5. In parallel, trigger additional proxy lookups through the same  
`pxProxyFactory`, or through a copied factory that shares the same  
`PxManager`.
6. Observe that once the first call enters the PAC path, later lookups  
block behind the same mutex.
7. A second variant is to serve the PAC file through a very slow or  
never-ending HTTP response and observe the same lock-held blocking during  
`curl_easy_perform()`.
Mitigation: Where possible, disable PAC and WPAD in affected deployments  
and use static proxy configuration until a code fix is available. If PAC  
must remain enabled, restrict PAC delivery to trusted local sources, avoid  
sharing a single `pxProxyFactory` or `PxManager` across concurrent threads  
where feasible, and apply strict operational timeouts around PAC retrieval  
and PAC execution in the surrounding application environment.
Proposed Fix: As a minimal mitigation, bound PAC download time so a slow or  
drip-fed response cannot block the manager indefinitely. A fuller  
remediation should also stop holding the manager mutex across PAC execution  
and add execution deadline or interrupt handling in the PAC runner.
```diff
diff --git a/src/backend/px-manager.c b/src/backend/px-manager.c
@@ -406,6 +406,14 @@ px_manager_pac_download (PxManager  *self,
if (curl_easy_setopt (self->curl, CURLOPT_CONNECTTIMEOUT, 30) !=  
CURLE_OK)
g_debug ("Could not set CONENCTIONTIMEOUT, continue");
+  /* Bound full transfer time and slow-drip responses */
+  if (curl_easy_setopt (self->curl, CURLOPT_TIMEOUT, 30L) != CURLE_OK)
+    g_debug ("Could not set TIMEOUT, continue");
+  if (curl_easy_setopt (self->curl, CURLOPT_LOW_SPEED_TIME, 15L) !=  
CURLE_OK)
+    g_debug ("Could not set LOW_SPEED_TIME, continue");
+  if (curl_easy_setopt (self->curl, CURLOPT_LOW_SPEED_LIMIT, 1L) !=  
CURLE_OK)
+    g_debug ("Could not set LOW_SPEED_LIMIT, continue");
+
```
```diff
diff --git a/src/backend/px-manager.c b/src/backend/px-manager.c
@@ -663,6 +663,9 @@ px_manager_get_proxies_sync (PxManager  *self,
   if (px_manager_expand_wpad (self, conf_url) || px_manager_expand_pac  
(self, conf_url)) {
+    if (px_manager_expand_wpad (self, conf_url) || px_manager_expand_pac  
(self, conf_url)) {
+      /* Follow-up hardening: avoid holding manager mutex across PAC JS  
execution
+       * by snapshotting needed state and executing PAC outside lock. */
        GList *list;
```


------
This report was generated using AI technology. Always review AI-generated  
content prior to use


Note You need to log in before you can comment on or make changes to this bug.