CWE-434
AllowedUnrestricted Upload of File with Dangerous Type
Abstraction: Base · Status: Draft
The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.
5995 vulnerabilities reference this CWE, most recent first.
GHSA-4RRG-J6G5-6X9X
Vulnerability from github – Published: 2025-12-18 21:31 – Updated: 2025-12-18 21:31File Thingie 2.5.7 contains an authenticated file upload vulnerability that allows remote attackers to upload malicious PHP zip archives to the web server. Attackers can create a custom PHP payload, upload and unzip it, and then execute arbitrary system commands through a crafted PHP script with a command parameter.
{
"affected": [],
"aliases": [
"CVE-2023-53942"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-18T20:15:52Z",
"severity": "CRITICAL"
},
"details": "File Thingie 2.5.7 contains an authenticated file upload vulnerability that allows remote attackers to upload malicious PHP zip archives to the web server. Attackers can create a custom PHP payload, upload and unzip it, and then execute arbitrary system commands through a crafted PHP script with a command parameter.",
"id": "GHSA-4rrg-j6g5-6x9x",
"modified": "2025-12-18T21:31:43Z",
"published": "2025-12-18T21:31:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-53942"
},
{
"type": "WEB",
"url": "https://github.com/leefish/filethingie"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/51436"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/file-thingie-authenticated-arbitrary-file-upload-remote-code-execution"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-4RV2-MWGH-33GJ
Vulnerability from github – Published: 2024-12-05 18:31 – Updated: 2024-12-05 18:31A vulnerability was found in code-projects Online Notice Board up to 1.0 and classified as critical. This issue affects some unknown processing of the file /registration.php of the component Profile Picture Handler. The manipulation of the argument img leads to unrestricted upload. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used.
{
"affected": [],
"aliases": [
"CVE-2024-12233"
],
"database_specific": {
"cwe_ids": [
"CWE-284",
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-05T17:15:11Z",
"severity": "MODERATE"
},
"details": "A vulnerability was found in code-projects Online Notice Board up to 1.0 and classified as critical. This issue affects some unknown processing of the file /registration.php of the component Profile Picture Handler. The manipulation of the argument img leads to unrestricted upload. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used.",
"id": "GHSA-4rv2-mwgh-33gj",
"modified": "2024-12-05T18:31:03Z",
"published": "2024-12-05T18:31:03Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12233"
},
{
"type": "WEB",
"url": "https://code-projects.org"
},
{
"type": "WEB",
"url": "https://github.com/LamentXU123/cve/blob/main/RCE1.md"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.286979"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.286979"
},
{
"type": "WEB",
"url": "https://vuldb.com/?submit.456458"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-4V2V-7W44-WQVX
Vulnerability from github – Published: 2022-05-24 17:32 – Updated: 2022-10-01 00:00IBM i2 iBase 8.9.13 could allow an attacker to upload arbitrary executable files which, when executed by an unsuspecting victim could result in code execution. IBM X-Force ID: 184579.
{
"affected": [],
"aliases": [
"CVE-2020-4588"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-10-30T14:15:00Z",
"severity": "HIGH"
},
"details": "IBM i2 iBase 8.9.13 could allow an attacker to upload arbitrary executable files which, when executed by an unsuspecting victim could result in code execution. IBM X-Force ID: 184579.",
"id": "GHSA-4v2v-7w44-wqvx",
"modified": "2022-10-01T00:00:17Z",
"published": "2022-05-24T17:32:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-4588"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/184579"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/6357037"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4V55-6J3Q-Q3G7
Vulnerability from github – Published: 2023-12-20 21:30 – Updated: 2026-04-28 21:33Unrestricted Upload of File with Dangerous Type vulnerability in Jeff Starr User Submitted Posts – Enable Users to Submit Posts from the Front End.This issue affects User Submitted Posts – Enable Users to Submit Posts from the Front End: from n/a through 20230902.
{
"affected": [],
"aliases": [
"CVE-2023-45603"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-12-20T19:15:10Z",
"severity": "CRITICAL"
},
"details": "Unrestricted Upload of File with Dangerous Type vulnerability in Jeff Starr User Submitted Posts \u2013 Enable Users to Submit Posts from the Front End.This issue affects User Submitted Posts \u2013 Enable Users to Submit Posts from the Front End: from n/a through 20230902.",
"id": "GHSA-4v55-6j3q-q3g7",
"modified": "2026-04-28T21:33:31Z",
"published": "2023-12-20T21:30:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-45603"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/vulnerability/user-submitted-posts/wordpress-user-submitted-posts-plugin-20230902-unauthenticated-arbitrary-file-upload-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4V5M-VWVP-P7W8
Vulnerability from github – Published: 2022-09-21 00:00 – Updated: 2022-09-22 22:45A file upload vulnerability exists in the storage feature of pagekit 1.0.18, which allows an attacker to upload malicious files
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "pagekit/pagekit"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.0.18"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2022-38916"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": true,
"github_reviewed_at": "2022-09-22T22:45:45Z",
"nvd_published_at": "2022-09-20T17:15:00Z",
"severity": "CRITICAL"
},
"details": "A file upload vulnerability exists in the storage feature of pagekit 1.0.18, which allows an attacker to upload malicious files",
"id": "GHSA-4v5m-vwvp-p7w8",
"modified": "2022-09-22T22:45:45Z",
"published": "2022-09-21T00:00:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-38916"
},
{
"type": "WEB",
"url": "https://github.com/pagekit/pagekit/issues/970"
},
{
"type": "PACKAGE",
"url": "https://github.com/pagekit/pagekit"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Pagekit vulnerable to Unrestricted Upload of File with Dangerous Type"
}
GHSA-4V82-6MR7-C9F3
Vulnerability from github – Published: 2022-10-08 00:00 – Updated: 2022-10-11 19:00An arbitrary file upload vulnerability in the component /leave_system/classes/Users.php?f=save of Online Leave Management System v1.0 allows attackers to execute arbitrary code via a crafted PHP file.
{
"affected": [],
"aliases": [
"CVE-2022-41379"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-10-07T19:15:00Z",
"severity": "HIGH"
},
"details": "An arbitrary file upload vulnerability in the component /leave_system/classes/Users.php?f=save of Online Leave Management System v1.0 allows attackers to execute arbitrary code via a crafted PHP file.",
"id": "GHSA-4v82-6mr7-c9f3",
"modified": "2022-10-11T19:00:55Z",
"published": "2022-10-08T00:00:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-41379"
},
{
"type": "WEB",
"url": "https://github.com/hegeoo/bug_report/blob/main/vendors/oretnom23/online-leave-management-system/RCE-1.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4V8W-5CM8-F73W
Vulnerability from github – Published: 2022-05-24 17:00 – Updated: 2024-04-04 02:36Zucchetti InfoBusiness before and including 4.4.1 allows any authenticated user to upload .php files in order to achieve code execution.
{
"affected": [],
"aliases": [
"CVE-2019-18204"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-10-30T19:15:00Z",
"severity": "HIGH"
},
"details": "Zucchetti InfoBusiness before and including 4.4.1 allows any authenticated user to upload .php files in order to achieve code execution.",
"id": "GHSA-4v8w-5cm8-f73w",
"modified": "2024-04-04T02:36:44Z",
"published": "2022-05-24T17:00:07Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-18204"
},
{
"type": "WEB",
"url": "https://blog.hacktivesecurity.com/index.php?controller=post\u0026action=view\u0026id_post=42"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4V99-JHJF-8P4P
Vulnerability from github – Published: 2022-05-24 16:47 – Updated: 2022-12-09 18:30IBM Intelligent Operations Center (IOC) 5.1.0 through 5.2.0 does not properly validate file types, allowing an attacker to upload malicious content. IBM X-Force ID: 157014.
{
"affected": [],
"aliases": [
"CVE-2019-4069"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-06-07T15:29:00Z",
"severity": "HIGH"
},
"details": "IBM Intelligent Operations Center (IOC) 5.1.0 through 5.2.0 does not properly validate file types, allowing an attacker to upload malicious content. IBM X-Force ID: 157014.",
"id": "GHSA-4v99-jhjf-8p4p",
"modified": "2022-12-09T18:30:30Z",
"published": "2022-05-24T16:47:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-4069"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/157014"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/docview.wss?uid=ibm10879953"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4VC8-WVHW-M5GV
Vulnerability from github – Published: 2025-07-09 15:33 – Updated: 2025-08-26 20:21Summary
You can affect the agent binaries used in a Juju controller and the code that is run in the binaries by simply having a user account on a controller. You aren't required to have a model or any permissions. This just requires a user account in the controller database.
Details
Because of the way Juju upload tools code works in the controller it only checks that the user uploading agent binaries is authenticated and is a user tag. No more checks are performed and it allows that user to upload binaries to any model they like (as long as they know the model uuid) or upload binaries to the controller (attacker doesn't need to know any uuid's for controller or controller model).
Once the poison binaries have been uploaded any new machine that is started in the affected model or controller will get started with the poison binaries. Alternatively administrator's of the controller running either juju upgrade-controller or juju upgrade-model will force distribution of the poisoned binaries to all machines in either the model or poison the controllers themselves.
On top of this the exploit can be done with the Juju client tooling itself and no real knowledge on constructing raw API requests is required.
The tools handler is the main piece of code that is used in the APIServer for handling upload requests and persisting the data uploaded: The following code references is how Juju uses and defines this: - The tools upload handler is defined here (https://github.com/juju/juju/blob/3.6/apiserver/apiserver.go#L972) - The tools upload handler is created in the api server here (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L766C2-L766C25). - The main authoriser that is used for the upload handler is created here (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L770C2-L770C28) - The upload handler is registered for the model here (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L902) - The upload handler is registered for the controller here (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L972)
The authoriser that is used (https://github.com/juju/juju/blame/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/httpcontext.go#L209) only confirms that the logged in user is authenticated and authenticated as a user tag. No other checks are performed.
The toolsUploaderHandler also uses another server func for getting the Mongo state. This also confirms a logged in user but the state that is returned to the caller is scoped to whatever model the requester has asked for. No checks are performed to make sure that the user in question actually has access to this model or the controller. See code here (https://github.com/juju/juju/blob/4e50a28cdde17832aa31634915fbe7442dca6ab3/apiserver/httpcontext.go#L38). We end up here through a few layers of indirection of https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L768
We can also see that when handlers are registered with no model uuid scope in the handler like the controller registration of the tools upload handler, the model uuid gets defaulted to that of the controller model. See (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L690).
PoC
This proof of concept was done with the latest tip of the juju/juju 3.6 branch (https://github.com/juju/juju/commit/cd12b4951d657a980e113564bf2ea82f167589fd). Pull this code and work from inside of the root of the code base. It is expected that this security issue applies to 2.9 onwards as well.
Repo steps:
-
Bootstrap a new controller to lxd. This was done with a compiled client from the branch but there is no reason performing this action from latest snap won't produce the same result.
juju bootstrap localhost sec-demo -
Add a new user to the controller. This is the user with no permissions or models that we will prove the problem with.
juju add-user poisoner poisoner -
From step 2 save the registration string that the
jujuclient prints out. -
We are going to remove the local
jujuadmin credentials and information that was made during bootstrap. We will use this later on for confirming the attack.mv ~/.local/share/juju /tmp/juju-bak -
Run the
jujucli registration command for the new user that was saved from step 3. Set the new password to whatever you wish and then re-enter to login into the controller. After this step we are now logged in as an unprivileged user to the controller. -
Apply the following patch to the currently checked out
jujucode base:
cat <<EOF | git apply -
diff --git a/cmd/jujud/main.go b/cmd/jujud/main.go
index f268509a52..1b01a74b66 100644
--- a/cmd/jujud/main.go
+++ b/cmd/jujud/main.go
@@ -315,6 +315,16 @@ func Main(args []string) int {
os.Exit(exit_err)
}
+ logger.Criticalf("----------------------")
+ logger.Criticalf("----------------------")
+ logger.Criticalf("----------------------")
+ logger.Criticalf("----------------------")
+ logger.Criticalf("Got access to the binary")
+ logger.Criticalf("----------------------")
+ logger.Criticalf("----------------------")
+ logger.Criticalf("----------------------")
+ logger.Criticalf("----------------------")
+
var code int
commandName := filepath.Base(args[0])
switch commandName {
diff --git a/version/version.go b/version/version.go
index 2bbc8968c8..40af52f337 100644
--- a/version/version.go
+++ b/version/version.go
@@ -18,7 +18,7 @@ import (
// The presence and format of this constant is very important.
// The debian/rules build recipe uses this value for the version
// number of the release package.
-const version = "3.6.6"
+const version = "3.6.7"
// UserAgentVersion defines a user agent version used for communication for
// outside resources.
EOF
- Set bogus model information. To make the
sync-agent-binarycommand work below we need to set a bogus model that is in use by the client. This is done through the localmodels.yamlfile. Theuuidfeatured here does not matter at and can be set to anything that parses as a uuid injuju. This is just to trick the client tooling, the attacker could just manually construct the http request their self to bypass this.
cat <<EOF > ~/.local/share/juju/models.yaml
controllers:
sec-demo:
models:
admin/controller:
uuid: 4dde46dd-a514-491e-8a5f-b908b5310c02
type: iaas
branch: ""
current-model: admin/controller
EOF
- Next build the changes with
make simplestreams. - The output of step 9 will provide an export command to run. Please execute this command to point the
jujuclient at your local simple streams cache. - Next sync the compiled agent binaries from step 9 to the controller with
juju sync-agent-binary --debug --agent-version 3.6.7.
At this stage the controllers agent binary cache has been poisoned and the security issue has been proven.
- We can now swap back to the administrator user to start forcing binary circulation.
mv ~/.local/share/juju /tmp/juju-poisonand thenmv /tmp/juju-bak ~/.local/share/juju
At this stage the issue can be demonstrated with just a simple juju upgrade-controller and a controller upgrade will kick off. You can also upgrade a model. When I was testing this my upgrade-controller failed to shut down the controller for reasons unrelated to this security issue. I was able to log into the controller and confirm with sha256sum that the controller had downloaded the new binaries and the checksums matched. They were also symlink as the new binaries to run for machine-0. This was under /var/lib/juju/tools on the controller machine.
It would also be possible to affect new machines coming up in a model by repeating the steps above but changing the version to that of the model that you want to be poisoned.
Impact
This is a bad vulnerability in my opinion. It allows a user with no permissions to eventually consume an entire juju controller with poisoned binaries and gain access to all of the infrastructure and secrets on that controller. Through model migration it would also be possible to poison other controllers that the user doesn't have access to.
This also requires that an administrator upgrade or migrate aspects of the controller. But a bad actor could affect brand new machines coming up in the system straight away.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/juju/juju"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.0.0-20250619215741-4034aa13c7cf"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-0928"
],
"database_specific": {
"cwe_ids": [
"CWE-285",
"CWE-434"
],
"github_reviewed": true,
"github_reviewed_at": "2025-07-09T15:33:56Z",
"nvd_published_at": "2025-07-08T18:15:26Z",
"severity": "HIGH"
},
"details": "### Summary\nYou can affect the agent binaries used in a Juju controller and the code that is run in the binaries by simply having a user account on a controller. You aren\u0027t required to have a model or any permissions. This just requires a user account in the controller database.\n\n### Details\nBecause of the way Juju upload tools code works in the controller it only checks that the user uploading agent binaries is authenticated and is a user tag. No more checks are performed and it allows that user to upload binaries to any model they like (as long as they know the model uuid) or upload binaries to the controller (attacker doesn\u0027t need to know any uuid\u0027s for controller or controller model).\n\nOnce the poison binaries have been uploaded any new machine that is started in the affected model or controller will get started with the poison binaries. Alternatively administrator\u0027s of the controller running either `juju upgrade-controller` or `juju upgrade-model` will force distribution of the poisoned binaries to all machines in either the model or poison the controllers themselves.\n\nOn top of this the exploit can be done with the Juju client tooling itself and no real knowledge on constructing raw API requests is required.\n\nThe tools handler is the main piece of code that is used in the APIServer for handling upload requests and persisting the data uploaded: The following code references is how Juju uses and defines this:\n- The tools upload handler is defined here (https://github.com/juju/juju/blob/3.6/apiserver/apiserver.go#L972)\n- The tools upload handler is created in the api server here (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L766C2-L766C25).\n- The main authoriser that is used for the upload handler is created here (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L770C2-L770C28)\n- The upload handler is registered for the model here (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L902)\n- The upload handler is registered for the controller here (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L972)\n\nThe authoriser that is used (https://github.com/juju/juju/blame/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/httpcontext.go#L209) only confirms that the logged in user is authenticated and authenticated as a user tag. No other checks are performed.\n\nThe `toolsUploaderHandler` also uses another server func for getting the Mongo state. This also confirms a logged in user but the state that is returned to the caller is scoped to whatever model the requester has asked for. No checks are performed to make sure that the user in question actually has access to this model or the controller. See code here (https://github.com/juju/juju/blob/4e50a28cdde17832aa31634915fbe7442dca6ab3/apiserver/httpcontext.go#L38). We end up here through a few layers of indirection of https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L768\n\nWe can also see that when handlers are registered with no model uuid scope in the handler like the controller registration of the tools upload handler, the model uuid gets defaulted to that of the controller model. See (https://github.com/juju/juju/blob/4bcbd094097016b2fde926afd8c9e590eabb3f0c/apiserver/apiserver.go#L690).\n\n### PoC\nThis proof of concept was done with the latest tip of the `juju/juju` 3.6 branch (https://github.com/juju/juju/commit/cd12b4951d657a980e113564bf2ea82f167589fd). Pull this code and work from inside of the root of the code base. It is expected that this security issue applies to 2.9 onwards as well.\n\nRepo steps:\n\n1. Bootstrap a new controller to lxd. This was done with a compiled client from the branch but there is no reason performing this action from latest snap won\u0027t produce the same result.\n` juju bootstrap localhost sec-demo`\n\n2. Add a new user to the controller. This is the user with no permissions or models that we will prove the problem with.\n`juju add-user poisoner poisoner`\n\n3. From step 2 save the registration string that the `juju` client prints out.\n\n4. We are going to remove the local `juju` admin credentials and information that was made during bootstrap. We will use this later on for confirming the attack.\n`mv ~/.local/share/juju /tmp/juju-bak`\n\n5. Run the `juju` cli registration command for the new user that was saved from step 3. Set the new password to whatever you wish and then re-enter to login into the controller. After this step we are now logged in as an unprivileged user to the controller.\n\n6. Apply the following patch to the currently checked out `juju` code base:\n```\ncat \u003c\u003cEOF | git apply -\ndiff --git a/cmd/jujud/main.go b/cmd/jujud/main.go\nindex f268509a52..1b01a74b66 100644\n--- a/cmd/jujud/main.go\n+++ b/cmd/jujud/main.go\n@@ -315,6 +315,16 @@ func Main(args []string) int {\n \t\tos.Exit(exit_err)\n \t}\n\n+\tlogger.Criticalf(\"----------------------\")\n+\tlogger.Criticalf(\"----------------------\")\n+\tlogger.Criticalf(\"----------------------\")\n+\tlogger.Criticalf(\"----------------------\")\n+\tlogger.Criticalf(\"Got access to the binary\")\n+\tlogger.Criticalf(\"----------------------\")\n+\tlogger.Criticalf(\"----------------------\")\n+\tlogger.Criticalf(\"----------------------\")\n+\tlogger.Criticalf(\"----------------------\")\n+\n \tvar code int\n \tcommandName := filepath.Base(args[0])\n \tswitch commandName {\ndiff --git a/version/version.go b/version/version.go\nindex 2bbc8968c8..40af52f337 100644\n--- a/version/version.go\n+++ b/version/version.go\n@@ -18,7 +18,7 @@ import (\n // The presence and format of this constant is very important.\n // The debian/rules build recipe uses this value for the version\n // number of the release package.\n-const version = \"3.6.6\"\n+const version = \"3.6.7\"\n\n // UserAgentVersion defines a user agent version used for communication for\n // outside resources.\nEOF\n```\n\n7. Set bogus model information. To make the `sync-agent-binary` command work below we need to set a bogus model that is in use by the client. This is done through the local `models.yaml` file. The `uuid` featured here does not matter at and can be set to anything that parses as a uuid in `juju`. This is just to trick the client tooling, the attacker could just manually construct the http request their self to bypass this.\n```\ncat \u003c\u003cEOF \u003e ~/.local/share/juju/models.yaml\ncontrollers:\n sec-demo:\n models:\n admin/controller:\n uuid: 4dde46dd-a514-491e-8a5f-b908b5310c02\n type: iaas\n branch: \"\"\n current-model: admin/controller\nEOF\n```\n\n8. Next build the changes with `make simplestreams`.\n9. The output of step 9 will provide an export command to run. Please execute this command to point the `juju` client at your local simple streams cache.\n10. Next sync the compiled agent binaries from step 9 to the controller with `juju sync-agent-binary --debug --agent-version 3.6.7`.\n\n**At this stage the controllers agent binary cache has been poisoned and the security issue has been proven.**\n\n11. We can now swap back to the administrator user to start forcing binary circulation. `mv ~/.local/share/juju /tmp/juju-poison` and then `mv /tmp/juju-bak ~/.local/share/juju`\n\nAt this stage the issue can be demonstrated with just a simple `juju upgrade-controller` and a controller upgrade will kick off. You can also upgrade a model. When I was testing this my `upgrade-controller` failed to shut down the controller for reasons unrelated to this security issue. I was able to log into the controller and confirm with sha256sum that the controller had downloaded the new binaries and the checksums matched. They were also symlink as the new binaries to run for `machine-0`. This was under `/var/lib/juju/tools` on the controller machine.\n\nIt would also be possible to affect new machines coming up in a model by repeating the steps above but changing the version to that of the model that you want to be poisoned.\n\n### Impact\nThis is a bad vulnerability in my opinion. It allows a user with no permissions to eventually consume an entire `juju` controller with poisoned binaries and gain access to all of the infrastructure and secrets on that controller. Through model migration it would also be possible to poison other controllers that the user doesn\u0027t have access to.\n\nThis also requires that an administrator upgrade or migrate aspects of the controller. But a bad actor could affect brand new machines coming up in the system straight away.",
"id": "GHSA-4vc8-wvhw-m5gv",
"modified": "2025-08-26T20:21:38Z",
"published": "2025-07-09T15:33:56Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/juju/juju/security/advisories/GHSA-4vc8-wvhw-m5gv"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-0928"
},
{
"type": "WEB",
"url": "https://github.com/juju/juju/commit/22cdcf6b54c2f371822e1c203d4f341be6c9589e"
},
{
"type": "WEB",
"url": "https://github.com/juju/juju/commit/311e374cb8d2431032c51fb3fb5c4b0aaaa7196c"
},
{
"type": "WEB",
"url": "https://github.com/juju/juju/commit/4034aa13c7cf5a37427fcd032925d5d21955b096"
},
{
"type": "WEB",
"url": "https://github.com/juju/juju/commit/b4176e6e45c2c3c817ab60b39e2d52f9a11a5ddf"
},
{
"type": "PACKAGE",
"url": "https://github.com/juju/juju"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2025-3805"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Juju allows arbitrary executable uploads via authenticated endpoint without authorization"
}
GHSA-4VGM-PR2V-749C
Vulnerability from github – Published: 2022-12-22 21:30 – Updated: 2025-04-16 18:31Mozilla VPN can load an OpenSSL configuration file from an unsecured directory. A user or attacker with limited privileges could leverage this to launch arbitrary code with SYSTEM privilege. This vulnerability affects Mozilla VPN < 2.7.1.
{
"affected": [],
"aliases": [
"CVE-2022-0517"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-22T20:15:00Z",
"severity": "HIGH"
},
"details": "Mozilla VPN can load an OpenSSL configuration file from an unsecured directory. A user or attacker with limited privileges could leverage this to launch arbitrary code with SYSTEM privilege. This vulnerability affects Mozilla VPN \u003c 2.7.1.",
"id": "GHSA-4vgm-pr2v-749c",
"modified": "2025-04-16T18:31:34Z",
"published": "2022-12-22T21:30:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-0517"
},
{
"type": "WEB",
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1752291"
},
{
"type": "WEB",
"url": "https://www.mozilla.org/security/advisories/mfsa2022-08"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
Generate a new, unique filename for an uploaded file instead of using the user-supplied filename, so that no external input is used at all.[REF-422] [REF-423]
Mitigation MIT-21
Strategy: Enforcement by Conversion
When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
Mitigation
Consider storing the uploaded files outside of the web document root entirely. Then, use other mechanisms to deliver the files dynamically. [REF-423]
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- For example, limiting filenames to alphanumeric characters can help to restrict the introduction of unintended file extensions.
Mitigation
Define a very limited set of allowable extensions and only generate filenames that end in these extensions. Consider the possibility of XSS (CWE-79) before allowing .html or .htm file types.
Mitigation
Strategy: Input Validation
Ensure that only one extension is used in the filename. Some web servers, including some versions of Apache, may process files based on inner extensions so that "filename.php.gif" is fed to the PHP interpreter.[REF-422] [REF-423]
Mitigation
When running on a web server that supports case-insensitive filenames, perform case-insensitive evaluations of the extensions that are provided.
Mitigation MIT-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation
Do not rely exclusively on sanity checks of file contents to ensure that the file is of the expected type and size. It may be possible for an attacker to hide code in some file segments that will still be executed by the server. For example, GIF images may contain a free-form comments field.
Mitigation
Do not rely exclusively on the MIME content type or filename attribute when determining how to render a file. Validating the MIME content type and ensuring that it matches the extension is only a partial solution.
Mitigation MIT-17
Strategy: Environment Hardening
Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Mitigation MIT-22
Strategy: Sandbox or Jail
- Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
- OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
CAPEC-1: Accessing Functionality Not Properly Constrained by ACLs
In applications, particularly web applications, access to functionality is mitigated by an authorization framework. This framework maps Access Control Lists (ACLs) to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application, or can run queries for data that they otherwise not supposed to.