<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/htb-imagery-q6xoiousp" -->

---
title: HTB: Imagery | daily.dev
description: A Flask-based image gallery application contains multiple vulnerabilities. A stored XSS in the bug report feature allows stealing admin cookies. The admin...
canonical: https://daily.dev/posts/htb-imagery-q6xoiousp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: HTB: Imagery | daily.dev
og:description: A Flask-based image gallery application contains multiple vulnerabilities. A stored XSS in the bug report feature allows stealing admin cookies. The admin...
og:url: https://daily.dev/posts/htb-imagery-q6xoiousp
og:image: https://api.daily.dev/og/posts/q6XOiOuSP.png
og:image:alt: HTB: Imagery
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# HTB: Imagery

**[0xdf hacks stuff](https://daily.dev/sources/0xdf)** · 37 min read · 1 upvotes · 0 comments

## Summary

A Flask-based image gallery application contains multiple vulnerabilities. A stored XSS in the bug report feature allows stealing admin cookies. The admin panel has a directory traversal vulnerability enabling source code and database access. The application uses MD5 password hashing and stores credentials in a JSON file. A command injection vulnerability exists in the image crop feature, exploitable only by test users. An encrypted backup file can be brute-forced to reveal additional password hashes. After cracking credentials and pivoting through users, a custom backup utility can be exploited via sudo to gain root access.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://0xdf.gitlab.io/2026/01/24/htb-imagery.html>

## Similar posts on daily.dev

- [HTB: CodeTwo](https://daily.dev/posts/htb-codetwo-klj991bhn) · 0xdf hacks stuff · 2 upvotes · 0 comments
- [HTB: HackNet](https://daily.dev/posts/htb-hacknet-ytv8gsdvp) · 0xdf hacks stuff · 0 upvotes · 0 comments
- [CodePartTwo HTB Walkthrough](https://daily.dev/posts/codeparttwo-htb-walkthrough-gzwjbhyde) · InfoSec Write-ups · 1 upvotes · 0 comments
- [HTB: Era](https://daily.dev/posts/htb-era-imytcy2o7) · 0xdf hacks stuff · 1 upvotes · 0 comments
- [HTB — Strutted Writeup: Linux Machine](https://daily.dev/posts/htb-strutted-writeup-linux-machine-x6cn8azui) · InfoSec Write-ups · 1 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#python](https://daily.dev/tags/python), [#flask](https://daily.dev/tags/flask)

[View this post on daily.dev](https://daily.dev/posts/htb-imagery-q6xoiousp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"HTB: Imagery","url":"https://daily.dev/posts/htb-imagery-q6xoiousp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/htb-imagery-q6xoiousp"},"datePublished":"2026-01-24T15:48:08.381Z","dateModified":"2026-01-24T15:48:35.246Z","description":"A Flask-based image gallery application contains multiple vulnerabilities. A stored XSS in the bug report feature allows stealing admin cookies. The admin...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/92caa7a97a823949915e3fba57ddd0f5?_a=AQAEulh","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/92caa7a97a823949915e3fba57ddd0f5?_a=AQAEulh","isAccessibleForFree":true,"articleSection":"0xdf hacks stuff","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"0xdf hacks stuff","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/16cdada70d5f4fac8b588c53bcf005ff","url":"https://daily.dev/sources/0xdf"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/htb-imagery-q6xoiousp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,python,flask","timeRequired":"PT37M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"0xdf hacks stuff","item":"https://daily.dev/sources/0xdf"},{"@type":"ListItem","position":3,"name":"HTB: Imagery"}]}
```

