Skip to content

Repository files navigation

Petstore API

To Build

docker build -t petstore .
docker run --name=petstore -d -p 5000:5000 petstore:latest

Purpose

This is a vulnerable by design API. It is very poorly coded to test and see how vulnerabilities can exist in APIs. It has been designed after the Swagger Pet Store API. It uses the same schema and endpoints.

Flaws Reported

  • SQL Injection
  • Command Injection
  • Local File Inclusion/Read

User Endpoints

VERBENDPOINTDESCNOTES
GET/user/<username>Retrieve a single user by username
GET/userRetrieve all users
POST/userCreate a user
POST/user/loginRetrieve an auth token
POST/user/logoutLogout user
PUT/user/<username>Update a user by username
DELETE/user/<username>Delete a user by username

Admin Endpoints

VERBENDPOINTDESCNOTES
GET/admin/log?logFile=log_1.logView current log fileLFI
POST/admin/run/uptimeView server uptimeCommand Injection

Pet Endpoints

VERBENDPOINTDESCNOTES
POST/petAdd a new pet
PUT/petUpdate and existing pet
GET/pet/findByStatusFind pet by status
GET/pet/<petId>Retrieve pet by Id
DELETE/pet/<petId>Deletes a pet by Id

Store Endpoints

VERBENDPOINTDESCNOTES
GET/store/inventoryDisplay store inventory
POST/store/orderCreate an order
GET/store/order/<orderId>Retrieve an order by Id
DELETE/store/order/<orderId>Delete an order by Id

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages