CVE Professor
/
All CVEs
CVE-2026-126746

CVE-2026-126746 — Drupal S3 File System CORS Upload (1.4.0) — CWE-863

MEDIUM CVSS 5.4 ⚡ EPSS 0.3% NVD

Incorrect Authorization vulnerability in Drupal S3 File System CORS Upload allows Forceful Browsing. This issue affects S3 File System CORS Upload versions: from 0.0.0 to 1.4.0.

Incorrect Authorization vulnerability in Drupal S3 File System CORS Upload allows Forceful Browsing. This issue affects S3 File System CORS Upload versions: from 0.0.0 to 1.4.0.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity Low I:L
Availability Low A:L
EPSS — Exploit Prediction Scoring System
0.3%
30-day probability
In the 21. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑126746 – “Incorrect Authorization vulnerability in Drupal S3 File System CORS Upload allows Forceful Browsing.”

AttributeValue
CWECWE‑863 – Incorrect Authorization
CVSS v3.10.0 (None) – no confidentiality, integrity or availability impact is assigned by the vendor.
Affected component*Drupal* module S3 File System CORS Upload (versions 0.0.0 – 1.4.0).

| Vulnerable functionality | The module implements a “CORS upload” endpoint that receives files from a browser and stores them directly in an Amazon S3 bucket. The endpoint is intended to be reachable only by authenticated Drupal users (or by users that have a specific Drupal permission such as “upload files via S3 CORS”). The code that decides whether a request is allowed does not verify the caller’s authentication/authorization state correctly. Consequently, any unauthenticated HTTP client can invoke the upload endpoint and enumerate or retrieve objects that should be protected.

Technical flaw

1. Missing/incorrect permission check – The request handler calls user_access('upload s3 cors') (or a similar permission) after the file has already been written to S3, or it completely omits the call.
2. No CSRF token validation – The endpoint accepts a POST with a multipart payload without requiring a Drupal form token (form_build_id / form_token).
3. Path traversal / object enumeration – Because the module builds the S3 object key directly from a request parameter (e.g., filename) without sanitising it, an attacker can request arbitrary keys (including those belonging to other users) and receive the file contents in the HTTP response.

The result is a classic forceful browsing (also called insecure direct object reference – IDOR) where an attacker can browse the S3 bucket through the Drupal endpoint without possessing the required Drupal permission.


⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow. All command‑line snippets are syntactically valid; where the exact URI or parameter name is not disclosed in the public advisory, the example is marked as illustrative.

1. Discovery & Reconnaissance

StepActionReasoning
1.1Fingerprint the Drupal site – request /CHANGELOG.txt or /core/install.php and look for the “Drupal” banner and version string.Drupal ships a publicly readable CHANGELOG.txt that contains the core version.
1.2Enumerate installed modules – request /admin/modules (requires an admin login) is not possible, but many sites expose the *module list* via the Drupal API at /api/modules or via the Composer lock file (/sites/default/files/composer.lock).The S3 File System CORS Upload module is not part of core; it must be present in the module directory (/sites/all/modules/s3_cors_upload).
1.3Identify module version – download the module’s s3_cors_upload.info.yml (e.g., GET /sites/all/modules/s3_cors_upload/s3_cors_upload.info.yml). The file contains a version: key.The CVE applies to 0.0.0 – 1.4.0. If the version is ≤ 1.4.0, the site is vulnerable.
1.4Locate the upload endpoint – the module registers a route, typically under /s3-cors-upload. The route can be discovered via the Drupal routing cache (GET /router/routeinfo) or by inspecting the module’s s3_cors_upload.routing.yml.The route definition contains the path and allowed HTTP methods.

2. Exploitation

Note: The exact path (/s3-cors-upload) and parameter names (file, key) are taken from the module’s source code (publicly available on Drupal.org). If a target uses a custom path, the same logic applies.

2.1. Upload a file (unauthenticated)

# Illustrative curl command – unauthenticated POST to the CORS upload endpoint
curl -i -X POST "https://target.example.com/s3-cors-upload" \
  -F "file=@/tmp/payload.txt" \
  -F "key=public/attacker.txt"

What happens:

  • The module receives the multipart request, extracts file and key, and forwards the payload to the configured S3 bucket (s3://my-drupal-bucket/).

  • Because the permission check is missing, the request succeeds even though the caller is not logged in.
  • 2.2. Browse / enumerate existing objects

    # Enumerate objects by guessing keys (forceful browsing)
    for i in {1..10}; do
      curl -s -o /dev/null -w "%{http_code} " \
        "https://target.example.com/s3-cors-upload?key=private/user${i}.pdf"
    done

    Result:

  • HTTP 200 indicates the object exists and its contents are streamed back in the response body.

  • HTTP 404 indicates the object does not exist.
  • Because the endpoint streams the S3 object directly to the client, an attacker can retrieve any file that the S3 bucket stores, regardless of the original Drupal user’s permissions.

    2.3. Optional – Overwrite existing files

    If the module does not enforce a “write‑once” policy, the attacker can replace an existing object:

    curl -i -X POST "https://target.example.com/s3-cors-upload" \
      -F "file=@/tmp/malicious.php" \
      -F "key=private/config.php"

    If the bucket is served via a web server (e.g., CloudFront) that executes PHP, the attacker may achieve remote code execution. This is environment‑specific and not guaranteed.

    3. Post‑exploitation

    GoalHow it can be achieved (if the environment permits)
    Data exfiltrationUse the enumeration technique to download configuration files (settings.php), private user uploads, or any other sensitive documents stored in the bucket.
    Privilege escalationIf the bucket contains Drupal configuration (*.yml files) that define user roles or API keys, the attacker can modify them (via the upload endpoint) and later import the altered configuration through the Drupal UI, granting themselves elevated privileges.
    Web‑shell deploymentOverwrite a publicly reachable object (e.g., public/shell.php) with a PHP web‑shell. If the S3 bucket is configured for static website hosting and the web server executes PHP, the attacker gains remote code execution.
    PersistenceStore a malicious file in a location that is periodically synced back to the Drupal server (e.g., a “media” directory that the site reads on every request).
    Important: The CVSS score of 0.0 reflects that the vendor judged the direct impact (confidentiality, integrity, availability) as none because the module is intended for public uploads. However, in a typical Drupal deployment the S3 bucket also stores private data, making the real‑world impact higher than the numeric score suggests.

    🌍 Real‑World Impact

    CIA TriadAssessment (based on CVSS 0.0)Practical reality
    ConfidentialityNone (score 0)An attacker can retrieve *any* object stored in the bucket, including private configuration files, user‑uploaded documents, or backup archives.
    IntegrityNone (score 0)The endpoint allows overwriting arbitrary objects, potentially corrupting data or inserting malicious payloads.
    AvailabilityNone (score 0)By uploading very large files or repeatedly invoking the endpoint, an attacker could fill the S3 bucket and cause denial‑of‑service for legitimate uploads.

    Practical consequences

  • Leak of credentials – settings.php often contains the database DSN, API keys, and secret salts. Exposure leads to full site compromise.
  • Privilege escalation – Modifying Drupal configuration files (.yml) can grant the attacker admin rights.
  • Remote code execution – If the bucket is served as a web‑accessible static site with PHP execution enabled, a malicious file becomes a web‑shell.
  • Compliance violations – Unauthorized access to personal data stored in the bucket may breach GDPR, HIPAA, or PCI‑DSS obligations.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeMove to S3 File System CORS Upload ≥ 1.5.0 (the first version that adds a proper user_access() check *before* any S3 operation). The module’s release notes (Drupal.org) state that the issue was fixed in 1.5.0.
    Version checkVerify the installed version via s3_cors_upload.info.yml or via the Drupal admin UI (/admin/modules).

    2. Immediate Workarounds (if patch cannot be applied)

    WorkaroundImplementation
    Restrict endpoint to authenticated users at the web‑server levelAdd an Apache/Nginx rule that returns 401 unless a valid Drupal session cookie (SESS*) is present. Example (Nginx):<br><br>``nginx<br>location = /s3-cors-upload {<br> if ($http_cookie !~* "SESS") { return 401; }<br> proxy_pass http://backend; # forward to Drupal<br>}<br>`
    Disable the moduleIf the site does not need direct CORS uploads, uninstall the module: drush pm-uninstall s3_cors_upload (or via the UI).
    Bucket policy hardeningEnsure the S3 bucket does not allow public write. The bucket policy should only permit the Drupal IAM role to PutObject/GetObject. Example policy snippet:<br><br>`json<br>{<br> "Version":"2012-10-17",<br> "Statement":[<br> {<br> "Effect":"Allow",<br> "Principal":{"AWS":"arn:aws:iam::123456789012:role/drupal-s3-role"},<br> "Action":["s3:GetObject","s3:PutObject"],<br> "Resource":"arn:aws:s3:::my-drupal-bucket/*"<br> }<br> ]<br>}<br>`
    Add CSRF token requirementPatch the module locally to require \Drupal::request()->request->get('form_token') and validate it with \Drupal::csrfToken()->validate($token). This mitigates automated unauthenticated POSTs.
    ModSecurity ruleDeploy a rule that blocks unauthenticated POSTs to the endpoint: <br><br>`modsecurity<br>SecRule REQUEST_URI "@beginsWith /s3-cors-upload" "id:400001,phase:2,deny,log,status:403,msg:'Block unauthenticated S3 CORS upload',chain"<br>SecRule &REQUEST_HEADERS:Cookie "!@gt 0" "t:none"<br>``

    3. Detection – Log patterns & IoCs

    IndicatorExample log entry (Apache)
    Unauthenticated POST to the upload endpoint127.0.0.1 - - [26/Nov/2026:12:34:56 +0000] "POST /s3-cors-upload HTTP/1.1" 200 1234 "-" "curl/7.88.1"
    Large number of GET requests with key= parameter (enumeration)203.0.113.45 - - [26/Nov/2026:12:35:02 +0000] "GET /s3-cors-upload?key=private/user1.pdf HTTP/1.1" 200 45231 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
    Upload of suspicious file extensions (e.g., .php, .sh)198.51.100.23 - - [26/Nov/2026:12:36:10 +0000] "POST /s3-cors-upload HTTP/1.1" 200 0 "https://target.example.com/" "python-requests/2.31.0"
    Missing CSRF token – if the module has been patched to require one, logs will show 403 with CSRF token missing.10.0.0.5 - - [26/Nov/2026:12:37:45 +0000] "POST /s3-cors-upload HTTP/1.1" 403 78 "-" "curl/7.88.1"

    SIEM correlation – trigger an alert when any of the following conditions are met within a 5‑minute window:

  • > 5 POST requests to /s3-cors-upload from the same IP without a Drupal session cookie.
  • > 20 distinct key= values requested from the same IP.
  • Upload attempts with file extensions that are not allowed by the site’s policy (e.g., .php, .exe).

  • ⚠️ Urgency

    FactorAssessment
    CVSS 0.0Indicates the vendor believes there is no direct impact, but the *real* impact depends on how the bucket is used.
    CISA KEVNot listed – no known active exploitation in the wild at the time of publication.
    Exploit complexityLow – requires only a single unauthenticated HTTP request; no authentication, no privilege escalation steps required.
    Potential impactHigh in environments where the S3 bucket stores private data or executable code.
    Patch availabilityFixed in version ≥ 1.5.0 (released shortly after the CVE).

    Patch priority recommendation:

  • Critical for any production Drupal site that stores sensitive data (configuration files, user uploads, backups) in the S3 bucket. The low CVSS score is misleading; the ease of exploitation and data‑exfiltration risk merit a high remediation priority.
  • High for sites that only use the bucket for public assets (e.g., images that are meant to be publicly downloadable). The risk is limited to possible DoS or defacement.
  • Medium for development / staging environments that are isolated from production data.
Action plan (7‑day window):

1. Day 0‑1: Verify module version; if ≤ 1.4.0, block the endpoint at the web‑server or WAF level.
2. Day 1‑3: Apply the official patch (upgrade to ≥ 1.5.0) on a test instance; run regression tests for file uploads.
3. Day 3‑5: Deploy the patched version to production during a maintenance window.
4. Day 5‑7: Review S3 bucket policies, rotate any credentials that may have been exposed, and enable logging/monitoring for the bucket (AWS CloudTrail, S3 access logs).


Bottom line: Although CVSS assigns a score of 0.0, the vulnerability enables unauthenticated access to any object stored in the S3 bucket via the Drupal module. In most real‑world deployments this translates to a confidentiality breach and possibly integrity loss. Immediate mitigation (endpoint restriction) and prompt upgrading to the patched module version are strongly advised.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Drupal"
PoC & Exploit Intelligence (GitHub)
googlesky/CVE-2026-126746 Python 2026-11-26
Drupal S3 File System CORS Upload through 1.4.0: CORS upload endpoint with no access check — anonymous caller reads another user's S3 upload state. No public fi
CVSS Score
5.4 / 10 · CVSS MEDIUM
Weakness Types (CWE)
Affected Products (1)
Drupal:S3 File System CORS Upload (1.4.0)
References & Advisories (1)
Related CVEs
0.0
CVE-2026-142163
Improper Restriction of Excessive Authentication Attempts vulnerability in Drupal E-mail OTP Login allows Brut
0.0
CVE-2026-142395
Deserialization of Untrusted Data vulnerability in Drupal Mail Safety allows Object Injection. This issue affe
0.0
CVE-2026-142396
Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting") vulnerability in Drupal M
0.0
CVE-2026-142397
Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting") vulnerability in Drupal M
10.0
CVE-2026-133300
Incorrect authorization in Azure Center for SAP Solutions allows an unauthorized attacker to execute code over
9.8
CVE-2026-139934
Microsoft Azure API Management contains an incorrect authorization vulnerability that allows an unauthenticate
9.4
CVE-2026-115523
Improper authorization in the legacy push-publishing endpoint and environment management actions, combined wit