Skip to content

Adds auxiliary module for Pretalx File Read (CVE-2023-28459) #20404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

msutovsky-r7
Copy link
Contributor

@msutovsky-r7 msutovsky-r7 commented Jul 22, 2025

This PR adds auxiliary file read module that exploits CVE-2023-28459. This PR should be merged before #20413.

Vulnerable Application

Pretalx is a web-based conference planning tool, used to manage call for paper submissions, talk selection and so on. It used by many major IT conferences - such as OffensiveCon, Hexacon,... Versions 2.3.1 and prior are vulnerable to arbitrary file read, which exploits unsanitized path in schedule export. The module requires set of credentials of Pretalx user and Pretalx needs to have existing conference, where the attacker can submit malicious proposal.

Installation steps:

  1. git clone https://github.com/pretalx/pretalx-docker.git
  2. Change content of docker-compose.yml to following:
services:
  pretalx:
    image: pretalx/standalone:v2.3.1
      # image: pretalx/dev
    # build: .
    container_name: pretalx
    restart: unless-stopped
    depends_on:
      - redis
      - db
    environment:
      # Hint: Make sure you serve all requests for the `/static/` and `/media/` paths when debug is False. See [installation](https://docs.pretalx.org/administrator/installation/#step-7-ssl) for more information
      PRETALX_FILESYSTEM_MEDIA: /public/media
      PRETALX_FILESYSTEM_STATIC: /public/static
    ports:
      - "80:80"
    volumes:
      - ./conf/pretalx.cfg:/etc/pretalx/pretalx.cfg:ro
      - pretalx-data:/data
      - pretalx-public:/public
  db:
    image: docker.io/library/postgres:15-alpine
    container_name: pretalx-db
    restart: unless-stopped
    volumes:
      - pretalx-database:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: veryunsecureplschange # same password as one that you will put in pretalx.cfg file later on
      POSTGRES_USER: pretalx
      POSTGRES_DB: pretalx
  redis:
    image: redis:latest
    container_name: pretalx-redis
    restart: unless-stopped
    volumes:
      - pretalx-redis:/data
volumes:
  pretalx-database:
  pretalx-data:
  pretalx-public:
  pretalx-redis:
  1. sudo docker-compose up
  2. Setup username and password
  3. Go to orga/event/
  4. Create new conference
  5. Go to orga/event/[conference name]/schedule/rooms/
  6. Create a room
  7. Go to orga/event/[conference name]/
  8. Make conference go live
  9. sudo docker exec -u 0 -it pretalx /bin/bash
  10. Make sure you have correct right on /data folder, so pretalx user can write export there

Verification Steps

  1. Install the application
  2. Start msfconsole
  3. Do: use auxiliary/scanner/http/pretalx_file_read_cve_2023_28459
  4. Do: set CONFERENCE_NAME [conference name]
  5. Do: set USERNAME [username]
  6. Do: set PASSWORD [password]
  7. Do: set RHOSTS [target IP address]
  8. Do: run

Options

CONFERENCE_NAME

The slug (shortcut) name of the conference. The module requires existing conference, where an attacker can submit malicious proposal (e.g. conference-secret-2025)

FILEPATH

Absolute path to the target file.

MEDIA_URL

Pretalx uses path to media folder, which is used as prepend to target file path to achieve arbitrary file read. The default value is /media, however, it can be modified by user.

USERNAME

Username of Pretalx user that can approve proposals and release schedule.

PASSWORD

Password of Pretalx user that can approve proposals and release schedule.

Scenarios

msf auxiliary(scanner/http/pretalx_file_read_cve_2023_28459) > run verbose=true 
[*] Running automatic check ("set AutoCheck false" to disable)
[+] The target appears to be vulnerable. Detected vulnerable version 2.3.1
[*] Register malicious proposal
[*] Logging with credentials: [username]/[password]
[*] Approving proposal
[*] Adding h85WcLe4t4 to schedule
[*] Releasing schedule
[*] Trying to extract target file
[*] Extraction successful
[*] Stored results in /home/ms/.msf4/loot/20250725165914_default_192.168.168.146_pretalx.etcpas_473038.txt
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

@msutovsky-r7 msutovsky-r7 changed the title Module init Adds auxiliary module for Pretalx File Read (CVE-2023-28459) Jul 22, 2025
Copy link

Thanks for your pull request! Before this can be merged, we need the following documentation for your module:

@mariomontecatine
Copy link
Contributor

Hi @msutovsky-r7 ! Here you have the doc you asked for. Have a good day :)

mariomontecatine added a commit to mariomontecatine/metasploit-framework that referenced this pull request Jul 23, 2025
@msutovsky-r7 msutovsky-r7 marked this pull request as ready for review July 27, 2025 10:43

fail_with(Msf::Module::Failure::Unknown, 'Could not found hidden inputs: creating profile info') unless submit_uri && csrf_token

Rex::Text.rand_text_alphanumeric(16).to_s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Rex::Text.rand_text_alphanumeric(16).to_s

cookie_jar.clear

vprint_status("Logging with credentials: #{datastore['EMAIL']}/#{datastore['PASSWORD']}")
fail_with Failure::NoAccess, 'Incorrect credentials' unless login(datastore['EMAIL'], datastore['PASSWORD'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fail_with Failure::NoAccess, 'Incorrect credentials' unless login(datastore['EMAIL'], datastore['PASSWORD'])
fail_with(Failure::NoAccess, 'Incorrect credentials') unless login(datastore['EMAIL'], datastore['PASSWORD'])


vprint_status('Wait for schedule ZIP to be exported')

sleep(5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make this a datastore option?

@bwatters-r7 bwatters-r7 self-assigned this Aug 5, 2025
@bwatters-r7
Copy link
Contributor

This seems bad....
image
image

@bwatters-r7
Copy link
Contributor

I'm using ubuntu_vert on the .211 hypervisor, if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants