Zum Hauptinhalt springen
LIVE
CVSS 4.8CVE-2026-138092 | A security flaw has been discovered in ggml-org llama.cpp up to 0.8.0. This vulnerability affects the function ggml_roll of the file ggml/src/ggml.c of the component Ggml Tensor Library Roll Operation. The manipulation results in integer overflow. The attack needs to be approached locally. Upgrading to version 0.9.0 is able to resolve this issue. The patch is identified as 0978a6e9022fb9bd6874b86154ee304e81929b9f. It is suggested to upgrade the affected compCVSS 10.0CVE-2026-138091 | A vulnerability was identified in Tenda AC10U 15.03.06.48. This affects the function TendaTelnet of the file /goform/telnet of the component Web UI. The manipulation leads to missing authentication. The attack is possible to be carried out remotely. The exploit is publicly available and might be used.CVSS 10.0CVE-2026-138090 | A vulnerability was determined in Tenda AC10U 15.03.06.48. Affected by this issue is the function ate_ifconfig_set of the file /bin/httpd of the component ATE Service. Executing a manipulation can lead to os command injection. The attack can be executed remotely. The exploit has been publicly disclosed and may be utilized.CVSS 6.9CVE-2026-138089 | A vulnerability was found in Youzan ZanProxy up to 5.1.0. Affected by this vulnerability is the function processRedirect of the file src/core/proxy/middleware/rule.ts of the component Forwarding Rule Redirect. Performing a manipulation of the argument Target results in path traversal. Remote exploitation of the attack is possible. The exploit has been made public and could be used. The project was informed of the problem early through an issue report but hasCVSS 6.9CVE-2026-138088 | A vulnerability has been found in SchneeHertz exhentai-manga-manager up to 1.6.16. Affected is the function mangaToLANraragiArchive of the file index.js of the component LAN Browsing Service. Such manipulation leads to missing authentication. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The reported GitHub issue was closed with the reason "completed". However, it was not possible to determine the PR or coCVSS 6.9CVE-2026-138087 | A flaw has been found in linhaojun857 aurora up to 07e9524caacf6ceb021f3408e73f900f230d05f2. This impacts the function generalKey of the file aurora-springboot/src/main/resources/application-prod.yml of the component JWT Token Service. This manipulation of the argument secret causes use of hard-coded cryptographic key . The attack may be initiated remotely. The exploit has been published and may be used. This product uses a rolling release model to deliverCVSS 6.9CVE-2026-138086 | A security vulnerability has been detected in wonderunit storyboarder 3.0.0. The impacted element is the function MobileServer of the file src/js/express-app/app.js. The manipulation leads to missing authentication. The attack can be initiated remotely. The exploit has been disclosed publicly and may be used. The project was informed of the problem early through an issue report but has not responded yet.CVSS 5.3CVE-2026-138085 | A weakness has been identified in ThingsBoard up to 4.2.2.7/4.3.1.7/4.4.0. The affected element is the function downloadTestReport of the file application/src/main/java/org/thingsboard/server/controller/DashboardReportController.java of the component Report Service. Executing a manipulation of the argument userId can lead to authorization bypass. It is possible to launch the attack remotely. The exploit has been made available to the public and could be used
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

JSON Schema in Dart

Everything which distinguishes man from the animals depends upon this ability to volatilize perceptual metaphors in a schema, and thus to dissolve an image…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 7 Min. Lesezeit
Quelle: dev.to
Rubrik: Secure Programming

Everything which distinguishes man from the animals depends upon this ability to volatilize perceptual metaphors in a schema, and thus to dissolve an image into a concept.

-- Friedrich Niezsche




When you know how to encode and decode JSON data, it can become annoying to deal with the structure every time. Worse, it can become a nightmare when some kind of data structure are being upgraded. That why some people created JSON Schema. The idea is to define what kind of fields and values should be contained in JSON objects. A package called json_schema was created to implement this standard.






Bootstrapping






$ dart create validate
Creating validate using template console...

.gitignore
analysis_options.yaml
CHANGELOG.md
pubspec.yaml
README.md
bin/validate.dart
lib/validate.dart
test/validate_test.dart

Running pub get... 0.3s
Resolving dependencies...
Downloading packages...
Changed 48 dependencies!
3 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.

Created project validate in validate! In order to get started, run the following commands:

cd validate
dart run

$ cd validate

$ dart pub add json_schema
Resolving dependencies...
Downloading packages...
_fe_analyzer_shared 103.0.0 (104.0.0 available)
analyzer 13.3.0 (14.0.0 available)
+ http 1.6.0
+ json_schema 5.2.2
package_config 2.2.0 (3.0.0 available)
+ quiver 3.2.2
+ rfc_6901 0.2.1
+ uri 1.0.0
Changed 5 dependencies!
3 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.






We can edit bin/validate.dart and import the json_schema package.




import 'package:json_schema/json_schema.dart';









Schema Conception




Don't trust, just verify.

-- Steven Levitt




For this example, we will use the examples present in the JSON Schema Getting Started tutorial. Their first JSON object looks like that:




{
"productId": 1,
"productName": "A green door",
"price": 12.50,
"tags": [
"home",
"green"
]
}






To help us with the tests, we can create a function helper instantiating a schema and validating data. Let call it validate(). To instantiate a new JsonSchema object, the JsonSchema.create() static function can be invoked. Then, the JsonSchema.validate() method will be called to check if the data passed is correct.




void validate(Map<String, dynamic> schema, Map<String, dynamic> data, {String? msg}) {
if (msg!=null) print("${msg}:");
final _schema = JsonSchema.create(schema);
final validate = _schema.validate(data);
print(" ${validate}: ${data}");
print("");
}






Before doing the whole specification for this object, we can start to specify only one of those fields, like the productId. json_schema module can use both a Map<String, dynamic> or a JSON<String> to load this. To make our life easier, we will create functions wrapper returning the schema we want as a Map.




Map<String, dynamic> _productId() {
return {
"description": "The unique identifier for a product",
"type": "integer",
};
}






A JSON schema describe an object and its properties. A productId is an integer. The description field is not used by the validator, it's only a way to help developers and designer to understand the structure. An object can be defined by many types:




  • null (e.g. null);


  • boolean (e.g. true or false);


  • number (e.g. 1 or -1.23);


  • integer (e.g 1 or 1024);


  • string (e.g. "test");


  • object (e.g. {});


  • array (e.g. []).




All of them are coming from the JSON specification itself.




Map<String, dynamic> _productName() {               
return {
"description": "Name of the product",
"type": "string"
};
}






The productName is a string. Nothing complex here, the schema is similar to the productId object.




Map<String, dynamic> _price() {
return {
"description": "The price of the product",
"type": "number",
"exclusiveMinimum": 0
};
}






A price is a number. To avoid negative numbers, we are also enforcing the specification with the exclusiveMinimum parameter. If a price is negative, the schema becomes invalid.




Map<String, dynamic> _tags() {
return {
"description": "Tags for the product",
"type": "array",
"items": {
"type": "string"
},
"minitems": 1,
"uniqueItems": true
};
}






Compound terms can also be created. The tags object is defined as an array or string. It must have at least 1 items (see minitems parameter) and must contain only unique items (see uniqueItems parameter).




Map<String, dynamic> _dimensions() {
return {
"type": "object",
"properties": {
"length": {
"type": "number"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
}
},
"required": [ "length", "width", "height" ]
};
}






Another object can be defined. It is also a compound term. In our case, the dimensions of an item must have a length as number, a width as number and a height as number too. All those fields are required (see required).




Map<String, dynamic> fullSchema() {
return {
"\$schema": "https://json-schema.org/draft/2020-12/schema",
"\$id": "https://example.com/product.schema.json",
"title": "Product",
"description": "A product in the catalog",
"type": "object",
"required": [
"productId",
"productName",
"price",
],
"properties": {
"productId": _productId(),
"productName": _productName(),
"price": _price(),
"tags": _tags(),
"dimensions": _dimensions()
}
};
}






Finally, the function fullSchema() is containing the whole JSON schema. Lot of fields here a kinda mandatory and are directly related to the JSON Schema specification. Let test that in our main entry-point.




void main(List<String> arguments) {
validate(fullSchema(), {}, msg: "empty data");

validate(fullSchema(), {
"productId": 1
}, msg: "productId only");

validate(fullSchema(), {
"productId": 1,
"productName": "A green door",
"price": 12.50
}, msg: "minimal valid data");

validate(fullSchema(), {
"productId": 1,
"productName": "A green door",
"price": 12.50,
"tags": [
"home",
"green"
]
}, msg: "valid data with tags");

validate(fullSchema(), {
"productId": 1,
"productName": "A green door",
"price": 12.50,
"tags": [
"home",
"green"
],
"dimensions": {
"length": 1,
"width": 2,
"height": 3,
}
}, msg: "valid data with tags and dimensions");
}






We can now run this application to see the result.




$ dart run
Resolving dependencies in `/tmp/dart/validate`...
Downloading packages...
Got dependencies in `/tmp/dart/validate`.
Building package executable...
Built validate:validate.

empty data:
INVALID, Errors: [# (root): required prop missing: productId from {}, /productId: required prop missing: productId from {}, # (root): required prop missing: productName from {}, /productName: required prop missing: productName from {}, # (root): required prop missing: price from {}, /price: required prop missing: price from {}]: {}

productId only:
INVALID, Errors: [# (root): required prop missing: productName from {productId: 1}, /productName: required prop missing: productName from {productId: 1}, # (root): required prop missing: price from {productId: 1}, /price: required prop missing: price from {productId: 1}]: {productId: 1}

minimal valid data:
VALID: {productId: 1, productName: A green door, price: 12.5}

valid data with tags:
VALID: {productId: 1, productName: A green door, price: 12.5, tags: [home, green]}

valid data with tags and dimensions:
VALID: {productId: 1, productName: A green door, price: 12.5, tags: [home, green], dimensions: {length: 1, width: 2, height: 3}}






As you can see, if the data received is missing some fields, the data is considered invalid. In other hands, if the requirements are there, the data is considered valid. Great, right? We now have a way to control the data received (or to control what we are sending).






Conclusion




Without approval and without scorn, but carefully studying the sentences word by word, one should trace them in the Discourses and verify them by the Discipline. If they are neither traceable in the Discourses nor verifiable by the Discipline, one must conclude thus: 'Certainly, this is not the Blessed One's utterance; this has been misunderstood by that bhikkhu - or by that community, or by those elders, or by that elder.' In that way, bhikkhus, you should reject it.

-- Siddharta Gautama




JSON Schema is a good way to make your application resilient and stable. It can be used as documentation tool, it will help to create tests, and it will also ensure the data received are legit. If you are working with public APIs, it can also help you to create the OpenAPI specifications. Finally, it will help you to design your application by thinking on what it needs, it will lead to a lean application containing only the necessary values.



JSON Schema can also be used to help us to reverse engineer private API interfaces by documenting what kind of data is working and which ones are not working. Creating specifications is great, Enjoy.



Wants to know more about JSON Schema? Here few interesting resources for you.





Happy Hack and Have fun!






Cover Image by Alex wong on Unsplash

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community discussion & comments

🌐 Join the main chat

Start the discussion in the Social Chat broadcast stream or submit an expert contribution via the supplement form above.

Community Rating &amp; Social Proof
⭐ Reader Rating
–
Ø / 5.0
No reader ratings yet
Was this article helpful?
0
Submit your rating
Detailed rating (optional)
Content & Quality
Source & Credibility
Freshness
Security Briefing Free · 1-Click Unsubscribe

Intelligence Digest — free

The top security news daily · unsubscribe anytime

Related story clusters & sources (vector AI)

2 Cluster
2 sources
SECURITY AFFAIRS AI-CYBERSECURITY NEWSLETTER ROUND 10
IT Security News 1 hour ago
1 more source
Similar posts
🔍 Verwandte News

Auch interessante Nachrichten JSON Schema in Dart

Thematisch verwandte Begriffe: JSON, Schema, Dart · 6 Treffer

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

Laden...

Loading posts ...

Laden...

Loading videos ...

💬 Loading comments…
Pull to refresh
Widgets & Topics
Loading widgets…
Nächster Beitrag