exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Lektor Static CMS 3.3.10 Arbitrary File Upload / Remote Code Execution

Lektor Static CMS 3.3.10 Arbitrary File Upload / Remote Code Execution
Posted Mar 20, 2024
Authored by kai6u

Lektor Static CMS version 3.3.10 suffers from an arbitrary file upload vulnerability that can be leveraged to achieve remote code execution.

tags | exploit, remote, arbitrary, code execution, file upload
SHA-256 | 12e46eeac4843dfaaf4f61083381648a44692cd6a4aade7ab73a5901f82f2336

Lektor Static CMS 3.3.10 Arbitrary File Upload / Remote Code Execution

Change Mirror Download
# Exploit Title: Lektor static content management system Version: 3.3.10 Arbitrary File upload
# Date: 20/03/2024
# Exploit Author: kai6u
# Vendor Homepage: https://www.getlektor.com/
# Software Link: https://github.com/lektor/lektor/releases/tag/v3.3.10
# Version: 3.3.10
# Tested on: Ubuntu 22.04
# Summary:
Arbitrary File upload in Lektor exist, It is possible to upload file to any directory on the server.
Affected Version:
< Version Release v3.3.10 (https://github.com/lektor/lektor/releases/tag/v3.3.10)
Fixed Version:
Latest Version Release v3.3.11 (https://github.com/lektor/lektor/releases/tag/v3.3.11)
# Steps:
3.Steps
The following are the steps of an attack that an attacker might perform.
1.Arbitrary File Upload and Store the payload
Access the administrator console and use the Add Page function to create a file
containing the payload to the templates directory and prepare to execute the
command.
2.Execute Command
Next, execute arbitrary commands on the administrator console by referencing the
file containing the malicious payload as templates

# Description:
1 ) Access to the administrator console via NW first creates a contetns.lr file containing the payload using Lektor's Add Page feature, specifying the templates directory.(Attacker also can upload to any directory.)

Payload:

{{ ''.__class__.__mro__[1].__subclasses__()[276]('whoami',shell=True,stdout=-1).communicate()[0].strip()}} }}

2 ) Create a new page by specifying the created contents.lr as template.

3 ) Use the preview function to check the sample page with the specified templates.

# Impact
Since attackers can execute arbitrary commands on the target environment, they can.
1.Steal sensitive files on the server.
2.Browse like /etc/passwd file and configure it to allow SSH connections as an OS user.
3.Use the server as a stepping stone for another attack and perform malicious actions.
4.Encrypt all content in the server and demand money.
5.Shut down the server and disrupt the target.
This is very dangerous because commands can be executed if the administrator's consolecan be accessed via the NW

# References
https://book.hacktricks.xyz/pentesting-web/ssti-server-side-template-injection/jinja2-ssti
https://github.com/lektor/lektor/releases/tag/v3.3.11

Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    17 Files
  • 8
    Oct 8th
    66 Files
  • 9
    Oct 9th
    25 Files
  • 10
    Oct 10th
    20 Files
  • 11
    Oct 11th
    21 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    14 Files
  • 15
    Oct 15th
    49 Files
  • 16
    Oct 16th
    28 Files
  • 17
    Oct 17th
    23 Files
  • 18
    Oct 18th
    10 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    5 Files
  • 22
    Oct 22nd
    12 Files
  • 23
    Oct 23rd
    23 Files
  • 24
    Oct 24th
    9 Files
  • 25
    Oct 25th
    10 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close