PKP-WAL <= 3.5.0-3 (X-Forwarded-Host) LESS Code Injection Vulnerability
The template manager passed a base URL derived from the request into the LESS parser, and that base URL could be influenced by the X-Forwarded-Host header. An unauthenticated attacker could inject LESS code, which the text says could lead to server-side request forgery or local file read.
karmainsecurity.com
Published on karmainsecurity.com
PKP Web Application Library (aka PKP-WAL or pkp-lib) version 3.4.0-10 and prior versions, and version 3.5.0-3 and prior versions, as used in Open Journal Systems (OJS), Open Monograph Press (OMP), and Open Preprint Systems (OPS).
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 base URL taken from the request (via X-Forwarded-Host) was passed unsanitised into the LESS parser, which treats it as a URL to import.
Impact
An unauthenticated attacker could inject LESS code, which could lead to SSRF or local file read.
What the attacker needed
No authentication needed; attacker controls X-Forwarded-Host header
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 stylesheet language called LESS can import other files by URL. The application built one of those URLs from a header the visitor controls, so a visitor could point it at a file or address of their choosing. That let them make the server fetch remote resources or read local files.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.