jwe 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86f868ba1b70133d7600b4e6cea7133f84f72ab76f0b16922eec4a332d0edd98
4
- data.tar.gz: a7629f6a7b4a3696bcce6d5f8393b5774b54901d8b20c34255bf853fab406dc0
3
+ metadata.gz: 932d7aac27c18e27353fbe02c694c9aca3c87a4c76ede9d663f462760d6c5ada
4
+ data.tar.gz: 1d1d72e8b5ba18424afaf70932fd08b6d9cbeb5a6ba55356e15a82f1a94695ef
5
5
  SHA512:
6
- metadata.gz: 8d1945714ca91325ecc3ff81c1852082771ab308c322e1ab53642d3d8859613af846520e4da20b46411343db4b7926cae7cad484cafd202c355e3931a39ba1f8
7
- data.tar.gz: cc076be886f8798680cd504159d14547229f9013e5f6ccdaf4b0afb5db071d5e75c4a4539c9f19857e69e39417e876adcb5a650a3b0d8a494f70221ea343c6f5
6
+ metadata.gz: 261a2c1920567bac989577ca58d498c61bf7d4912c4d66a9232448ef357e997bbc9d8b7ce9fd0828bbf7e3e14f93e49bb7ad4ecb54ea071574247389f27d4992
7
+ data.tar.gz: 51f82c565e51404d7fced2d27e65f39586e56026cf8fcd77c5fb99c8e08cc8363e2bd3c37dec13b4b5cfefb701edb45f3ad61591307c68b194bd7151f80bb48d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.1.1](https://github.com/jwt/ruby-jwe/tree/v1.1.1) (2025-08-07)
4
+
5
+ [Full Changelog](https://github.com/jwt/ruby-jwe/compare/v1.1.0...v1.1.1)
6
+
7
+ **Fixes and enhancements:**
8
+
9
+ - Fix tag length checking for AES-GCM (CVE-2025-54887)
10
+
3
11
  ## [v1.1.0](https://github.com/jwt/ruby-jwe/tree/v1.1.0) (2025-07-22)
4
12
 
5
13
  [Full Changelog](https://github.com/jwt/ruby-jwe/compare/v1.0.0...v1.1.0)
@@ -38,7 +38,11 @@ module JWE
38
38
  cipher.send(direction)
39
39
  cipher.key = cek
40
40
  cipher.iv = iv
41
- cipher.auth_tag = tag if direction == :decrypt
41
+ if direction == :decrypt
42
+ raise JWE::InvalidData, 'Invalid ciphertext or authentication tag' unless tag.bytesize == 16
43
+
44
+ cipher.auth_tag = tag
45
+ end
42
46
  cipher.auth_data = auth_data
43
47
  end
44
48
 
data/lib/jwe/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JWE
4
- VERSION = '1.1.0'
4
+ VERSION = '1.1.1'
5
5
  end
data/spec/jwe/enc_spec.rb CHANGED
@@ -130,6 +130,14 @@ gcm.each do |group|
130
130
  end
131
131
  end
132
132
 
133
+ context 'when the tag is not 16 bytes' do
134
+ it 'raises an error' do
135
+ enc = klass.new(key, group[:iv])
136
+ enc.tag = group[:tag][0...-1]
137
+ expect { enc.decrypt(group[:helloworld], '') }.to raise_error(JWE::InvalidData)
138
+ end
139
+ end
140
+
133
141
  context 'when the ciphertext is not valid' do
134
142
  it 'raises an error' do
135
143
  enc = klass.new(key, group[:iv])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Boffa
@@ -78,7 +78,7 @@ licenses:
78
78
  - MIT
79
79
  metadata:
80
80
  bug_tracker_uri: https://github.com/jwt/ruby-jwe/issues
81
- changelog_uri: https://github.com/jwt/ruby-jwe/blob/v1.1.0/CHANGELOG.md
81
+ changelog_uri: https://github.com/jwt/ruby-jwe/blob/v1.1.1/CHANGELOG.md
82
82
  rubygems_mfa_required: 'true'
83
83
  rdoc_options: []
84
84
  require_paths: