Skip to content
Path traversal Write-up Intermediate

NimForum

NimForum's reStructuredText rendering allowed the include directive to read local files, despite documentation claiming it was disabled. An attacker could read arbitrary files, including the forum's configuration with secrets, via the preview endpoint.

nns.ee

Published on nns.ee

And habitually review the third party code you're using - even when it's in the standard library.

The author, on nns.ee

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the standard library's rstToHtml procedure did not actually disable the include directive as its documentation claimed, and the forum relied on that claim.

Impact

An attacker could read arbitrary local files, including the forum's configuration with secrets, on all NimForum instances.

What the attacker needed

Access to the preview endpoint; ability to submit reStructuredText content

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A forum let people format posts using a language called reStructuredText. That language has a feature to include other files, which the forum's documentation said was turned off. But it was not, so anyone could make the forum show the contents of files on its server, like its own settings file.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.