Cross-site Request Forgery (CSRF) Affecting archivy package, versions [,1.6.2)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.07% (33rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-ARCHIVY-2326695
  • published26 Dec 2021
  • disclosed26 Dec 2021
  • creditScaramouche

Introduced: 26 Dec 2021

CVE-2021-4162  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

Upgrade archivy to version 1.6.2 or higher.

Overview

archivy is a Minimalist knowledge base focused on digital preservation and building your second brain.

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) due to missing CSRF token validation in /dataobj/delete/<int:dataobj_id>, which makes it possible to accept "GET" and "DELETE" methods instead of "POST" method.

POC:

  1. Create any note, get it's ID.
  2. Run page from PoC.html with concrete ID in your browser, click the button.
  3. Observe that the note with specified ID was deleted.
// PoC.html

<form action="http://127.0.0.1:5000/dataobj/delete/{yourNoteID}" method="GET"> <input type="submit" value="Click me"/> </form>

References

CVSS Scores

version 3.1