
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@brickert/edgeosapi
Advanced tools
An unofficial API wrapper in NodeJS for the Ubiquiti EdgeOS devices v1.x.x.
Tested on a EdgeRouter X v1.10.7. I'm assuming this is only compatible on the v1.x.x firmware only.
You may want to do a dry-run with an API client like PostMan on the endpoint /api/edge/get.json. After logging-in with a cookie session to view all the object properties.
Logging in on the root directory with a POST request with an x-www-form-urlencoded body with username and password key pair. Reuse the cookies for the subsequent requests. If you don't get 3 cookies (That I'm aware of) you may need to manually handle the initial redirects to the dashboard.
Protected requests (anything that changes the device) requires adding a X-CSRF-TOKEN to the headers; obtained from the cookies after login. Cookies by default are only good for about 20 minutes. It renews with every successful request.
Most of the help was from Matthew1471 from their repo at https://github.com/matthew1471/EdgeOS-API/tree/master/Documentation. Thank you!
I have changed some properties to make it easier to access. However, you will need to follow exactly (including case-sensitivity) how it's structured when setting, updating, and removing configurations. (See the /api/edge/get.json response) The request will still go through, but nothing will update. This is a limitation by Ubiquiti that cannot be worked around from what I know.
Enough methods are completed for the basic CRUD operations on most properties on the device. With most things requiring the use of batch set and delete endpoint and method EdgeOS.batchSetConfig() & EdgeOS.batchDeleteConfig()
As I push updates to this more methods will appear. There will be some properties missing here that are not accessible. It's around 90% coverage. I have not implemented anything related to the Unifi and UNMS stuff.
Use the package manager npm to install.
npm install @brickert/edgeosapi
import { EdgeOS } from '@brickert/edgeosapi`;
try {
const edgeOS = new EdgeOS({
cookie_session_lifetime = 10,
hostName = "example.local",
username = "admin",
password = "password",
userAgent = "EdgeOSAPI"
});
await edgeOS.retryableLogin(3);
await edgeOS.firewall.fetch();
console.log(edgeOS.firewall.groups.network_groups.filter(group => group.name == "LAN"));
/* {
name: "LAN",
address: ["192.168.1.0/24"],
description: "Example comment"
}
*/
} catch (e) {
throw e;
}
FAQs
Ubiquiti EdgeOS NodeJS API Wrapper
We found that @brickert/edgeosapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.